0
votes
1answer
35 views

Keep source port for outgoing packets

I have 2 interfaces eth0(192.168.0.1) and eth1(10.1.1.15). And I do nat for all packets in this way. iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE Now I want to keep source port ...
1
vote
1answer
1k views

iptables port forwarding for active UDP connections

I am trying to set up port forwarding on UDP from port 12345 to port 54321 using the following: iptables -t nat -A PREROUTING -p udp -i eth0 -d 192.168.0.1 --dport 12345 -j DNAT --to ...
2
votes
1answer
126 views

Connect to the server through SSH (tunneling)

Hello!! I have a set of servers with the layout in the image attached. Lets call them Server A, B and C. Details for the scenario: Server A is where all the processing is done and user is ...
2
votes
5answers
15k views

Linux: How to port forwarding with iptables between 2 hosts on different networks?

I'm almost desperate... I've been reading for about 2 days iptables forwarding examples and I cannot do a simple port forwarding. I got 2 machines on different networks. server1 (S1 with ip ...
8
votes
3answers
7k views

How to forward port 80 to another port on the samemachine?

How can I forward requests coming in on port 80 to another port on the same linux machine? I used to do this by changing nat.conf, but this machine that I'm using doesn't have NAT. What's the ...
0
votes
1answer
85 views

Proxy setup question

I want to be able to access a website that is IP restricted outside the UK from my cable DSL in Germany. A friend of mine set up a proxy server in the UK that whitelists my dedicated Debian server at ...
0
votes
1answer
290 views

Linux iptables usage route outgoing traffic

Hi: I have a problema, i want to enter a site that blocks by default all ips, except some ones, my server ip is not allowed, but i have another server ip allowed, so i have done a local ssh port ...
0
votes
1answer
849 views

Redirect local service to custom proxy

I'm trying to create a custom proxy program but I have a problem. My program connects to a fixed port from a random port and I need to tunnel all this traffic by my local proxy. I think the solution ...
39
votes
4answers
107k views

How can I port forward with iptables?

I want connections coming in on ppp0 on port 8001 to route to 192.168.1.200 on eth0 on port 8080 I've got these two rules -A PREROUTING -p tcp -m tcp --dport 8001 -j DNAT --to-destination ...