Results 1 to 1 of 1
Thread: Iptables connection forwarding
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jul 2009
Iptables connection forwarding
Some friends and I have a root-server (IP = 91.121.X.X) and one account on a SMB server.
The SMB server allows multiple connections but only from a single IP so we would like to use our root-server to forward the connections to the SMB-server.
Currently we use Firestarter to mange the normal rules and this script for the con. forwarding:
sudo iptables -t nat -A PREROUTING --dst $YourIP -p tcp --dport $YourPort -j DNAT \
sudo iptables -t nat -A POSTROUTING -p tcp --dst $TargetIP --dport $TargetPort -j SNAT \
sudo iptables -t nat -A OUTPUT --dst $YourIP -p tcp --dport $YourPort -j DNAT \
However this only works from our root-server itself. On the root-server I can connect to itself on port 41000 and it forwards it to the SMB server without problems. I opened the Port 41000 with firestarter, but it still doesn't work from our home PCs.
We really don't know whats wrong.
Can somebody please help us?