masqueraded and got internet connection, no remote access to gateway!
Hi everyone,
I tried reading some threads but did not found solution. This is because of my lower understanding with iptables and I wanted to share a connection in my home lan using iptables forwarding but some how packets do get forwarded ,I can use Internet connection on all my machines but I cant access the machine (gateway) remotely. I think I am directly forwording the packets destined to the machine itself and want a way to return them to the machine. RETURN has something to do with this and I cant figure it out. Can some body help me. Quote:
Where I am going wrong? Thanks in advance Aniruddha |
If your LAN is connected to eth0, and eth1 is your Internet connection, your POSTROUTING command looks fine. (Use SNAT instead of MASQUERADE if you have a static Internet IP address.) This should not interfere with your LAN operation and you should not need any additional commands to make it work.
If you are having trouble (for example) ssh'ing into this machine from another box on your LAN, your problem is probably in your netfilter INPUT chain, or possibly OUTPUT chain. If you can't access this machine from the Internet, your problem could, again, be in the INPUT or OUTPUT chain. But if you have a router (or NAT device) between your gateway machine and the Internet, you will need to set it up for port forwarding before you can access your box from the Internet. |
Hi BlackHole54,
Thanks for your reply, I will check it out with snat and post what happens next. Thanks again Aniruddha |
All times are GMT -5. The time now is 01:41 PM. |