Need help with iptables

Linode Staff

I need help with IP forwarding with IP tables. I want to preserve the source IP of any connections and route it through Linode via IPTABLES to my own servers. How can I go about doing this? I tried doing a limited masquerade setup and tried a SNAT setup, but neither has properly worked for me.

1 Reply

I found the following resources from others who have attempted to configure IP forwarding using iptables:

From the above resources I get the sense that using SNAT rewrites the Source IP address in the IP header of the packet, which may be necessary in order to establish a TCP connection but may also make it impossible to maintain the original source IP address. You can read more here:

You may have more success with what you are trying to achieve using a different service like HAProxy:

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct