iptables masquerading problem with some (not all) sites
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.
iptables masquerading problem with some (not all) sites
I have a lan with 2 computers. My gateway is running iptables (masquerading) and shares connection to the internet for another laptop. my Laptop can connect to the internet but cannot access wwwhotmailcom, wwwmappyfr and some others; though my gateway can connect to them. Any idea of this problem?
You must have conflicting iptables rules, more specifically rules applying to computers behind your firewall (your laptop). There is no masquerading involved for your firewall box, only for computers going through it.
The only thing I need for masqueraing is this:
iptables -t nat -A POSTROUTING -s $network_addr -j SNAT --to $external_ip
Also ensure your laptop isn't enforcing any filtering by shutting down iptables on it.
I have ever tried
IPTABLES -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
or
IPTABLES -t nat -A POSTROUTING -j SNAT --to-source $IP
my gateway has not any problem to connect every site on internet.
my laptop (under WinXP) can connect all site on the internet EXCEPT hotmail, mappy.
I tried to sniff when it connects to hotmail for example, but hotmail does not
respond. google responds well. So my problem affects only particular web server.
So my question is:
why my laptop can connect google and cannot connect hotmail?
I don't think my laptop is enforcing any filtering by shutting down iptables nor it blocks some sites because it is the same problem when my laptop is under XP or under linux.
How can I bypass my router? (my lalptop can go anywhere on internet when it is directly plugged my adsl modem in)
Thank you again for your help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.