I got referred here from StackOverflow.
I'm using IpTables to forward an incoming port on one server to an external server (not on LAN) and the same port. The problem I'm having is that I have to use MASQUERADE or it will not forward. So all users on my server have my first servers IP as their IP.
Here is a breakdown of my iptables configuration.
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere anywhere tcp dpt:25565 to:192.241.156.238:25565
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
Any help would be deeply appreciated so I can port forward from the one server to the other.
Also, a question, when I do this, does it just trannsfer the connection, then all data back and forth is between the two PCs? Or am I doubling up my bandwidth?