Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to set up masquerading between two local networks, infact I've only three computers one of which is the gateway. I could set the ip-forwarding but how can I set up AND DETERMINE that there is a MASQUERADING running?
The clients are linux machines and are congured properly(gateway, dns).
The packet forwarding is working.
At the gateway side i try the following rules:
iptables -t nat -POSTROUTING -SNAT -s 192.168.2.0/24 --to 192.168.9.1
iptables -t nat -POSTROUTING -SNAT -s 192.168.9.0/24 --to 192.168.2.1
I'm using the netsniffer tcpdump to determine if there occurs masquerading, but it seems that it intercepts all the traffic in the networks ingnoring if there is masqerading or not.
Any help would be appreciated.
The exact rules are:
iptables -t nat -A POSTROUTING -j SNAT -s 192.168.2.0/24 --to 192.168.9.1
iptables -t nat -A POSTROUTING -j SNAT -s 192.168.9.0/24 --to 192.168.2.1
My goal ist to SHOW that MASQUERADING is actually taking place, otherwise masquerading is used for dialup and leased line connections, but once again I wanted to show the technology in action.
Well the strange thing is that I've masquerading up at home, but at the Uni with analogous configuration(2 end-compis and 1 GW), I can't make it to work.
And also at home, when the masquerading is in action i can ping only in the one direction, namely from the source(to be masqueraded) network to the destination(receiving masqueraded packets) network.
Originally posted by jharris And if you use the lines I supplied what happens?
Quote:
Originally posted by acpi And also at home, when the masquerading is in action i can ping only in the one direction, namely from the source(to be masqueraded) network to the destination(receiving masqueraded packets) network.
Thats correct. You can't ping the other was as whatever is behing the masquerader is hidden, and in most cases doesn't have a public IP address so there is no direct route to it anyway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.