Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need a rule that will allow me to send back all traffic on port 1723 to an arbitrary, non-gateway box on the private network with all packet information intact.

The machine I need to target is acting as a gateway just for this port though it is not configured as a standard interface gateway. Things are set up this way to avoid putting in a work request to get the phone company to charge its router, sitting on client side. I need the box with the open port just to sit in the middle and forward traffic between the server and client.

The middleman is a Windows machine, but I believe it is configured correctly. Watching Wireshark, my Linux machine never sends it back the data though ip_forward is 1 and I have a DNAT rewrite rule in nat PREROUTING. :(

share|improve this question

1 Answer 1

I use this (output is from iptables-save) to redirect:

*nat
...
-A PREROUTING -p tcp -m tcp --dport 5000 -j DNAT --to-destination 192.168.7.21
-A PREROUTING -p udp -m udp --dport 5000 -j DNAT --to-destination 192.168.7.21

HTH

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.