LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-14-2004, 06:48 PM   #1
pepisfree
LQ Newbie
 
Registered: Aug 2004
Distribution: 2.6.12-gentoo-r10
Posts: 12

Rep: Reputation: 0
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?
 
Old 08-14-2004, 07:25 PM   #2
futhark
Member
 
Registered: Nov 2003
Location: Montréal (Can)
Distribution: FC4
Posts: 110

Rep: Reputation: 15
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.
 
Old 08-15-2004, 07:36 AM   #3
pepisfree
LQ Newbie
 
Registered: Aug 2004
Distribution: 2.6.12-gentoo-r10
Posts: 12

Original Poster
Rep: Reputation: 0
I have got only one rule for iptables.

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?

thank you for your responses...
 
Old 08-15-2004, 08:38 AM   #4
seabass55
Member
 
Registered: Jan 2003
Location: 127.0.0.1
Distribution: Fedora&Gentoo
Posts: 207

Rep: Reputation: 30
What happens when you try to do a tracert from the laptop?

have you treid bypassing the router?
 
Old 08-15-2004, 04:26 PM   #5
futhark
Member
 
Registered: Nov 2003
Location: Montréal (Can)
Distribution: FC4
Posts: 110

Rep: Reputation: 15
Quote:
Originally posted by futhark

Also ensure your laptop isn't enforcing any filtering by shutting down iptables on it.
What about this?
 
Old 08-16-2004, 12:43 AM   #6
jaganpjames
LQ Newbie
 
Registered: Aug 2004
Location: Hyderabad
Distribution: RH, fedora
Posts: 19

Rep: Reputation: 0
check if u are blocking the said sites on ur xp machine..
 
Old 08-16-2004, 01:19 PM   #7
pepisfree
LQ Newbie
 
Registered: Aug 2004
Distribution: 2.6.12-gentoo-r10
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 08-16-2004, 10:39 PM   #8
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Am I correct, in that the XP laptop can connect to some websites but not others? If so, it sounds like an ECN issue.

Last edited by Capt_Caveman; 08-16-2004 at 10:43 PM.
 
Old 08-18-2004, 07:45 AM   #9
pepisfree
LQ Newbie
 
Registered: Aug 2004
Distribution: 2.6.12-gentoo-r10
Posts: 12

Original Poster
Rep: Reputation: 0
problem fixed

ok I've read a post on this site (see below, thanks to nufish)) which has dealed with the same problem (problem about mtu between ppp and ethernet?).

I've fixed it by adding a rule to iptables:

$IPTABLES -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

Now everything is ok!
see you...

Last edited by pepisfree; 08-18-2004 at 07:56 AM.
 
Old 08-18-2004, 07:48 AM   #10
pepisfree
LQ Newbie
 
Registered: Aug 2004
Distribution: 2.6.12-gentoo-r10
Posts: 12

Original Poster
Rep: Reputation: 0
just have seen:
http://www.linuxquestions.org/questi...threadid=15009
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables : masquerading not possible iamtux Linux - Networking 3 06-04-2005 11:32 PM
squid and iptables masquerading egyptian Linux - Security 1 09-05-2004 04:31 AM
iptables MASQUERADING at boot krishanprath Linux - Newbie 2 09-30-2003 07:41 AM
Iptables Masquerading GOLDF1NG3R Linux - Security 3 11-10-2001 11:51 PM
Iptables Masquerading GOLDF1NG3R Linux - Networking 4 11-01-2001 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration