All of lore.kernel.org
 help / color / mirror / Atom feed
* Help: iptables NAT broken with pppoe
@ 2005-05-06 16:36 Albrecht Dreß
  2005-05-07  6:12 ` Taylor, Grant
  0 siblings, 1 reply; 14+ messages in thread
From: Albrecht Dreß @ 2005-05-06 16:36 UTC (permalink / raw)
  To: netfilter


[-- Attachment #1.1: Type: text/plain, Size: 2186 bytes --]

Hi,

I am new to this list, so please xcuse me if this is a dumb question.

I have a small home network looking as follows:

         192.168.42.3
         -----------     -------
        | PMac G4   |   |       |---DSL Modem (ppp0)
ISDN---|ippp0  eth0|---|Switch |---two computers, printer (192.168.42.x)
         -----------     -------

The machine marked as "PMac G4" is a Powermac G4/800 "Silver", running  
Linux 2.6.11.4 on the Yellowdog 4.01 disto, which includes iptables v1.2.9.

I had an "old" setup with the G4 working as router via the isdn adaptor,  
which worked flawlessly. I now switched to ADSL, so I removed the ISDN  
connection and just changed to ppp0 using the kernel-based pppoe driver.

Now the machines in my "local" net can still connect the G4, but  
nat/masquerading to the outside world fails. I stripped down my ipfilter  
config to a completely open one (see attached fw.sh script), but still had  
no success.

Running tcpdump on both eth0 and ppp0, I saw that e.g. a http request from  
one of the local machines (see 2nd attachment) is actually passed via ppp0  
to the remote host. However, all reply packets from that box are never  
passed back to eth0, so this looks to me as if masquerading somehow fails.

Does anyone know what I missed here? The same iptables setup (actually a  
lot stricter, i.e. a "real" firewall) worked fine with isdn/ippp0. I also  
verified that it is at least technically working; running the G4 under  
MacOS 10.3.9 client, with a little ipfw and natd fiddling the machine is  
doing nat as expected. However, as I usually use Linux, a running nat  
setup with iptables is really important for me.

HELP - I am really lost here, so any help/pointer would be really welcome!

Thanks in advance, Albrecht.


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Albrecht Dreß  -  Johanna-Kirchner-Straße 13  -  D-53123 Bonn (Germany)
        Phone (+49) 228 6199571  -  mailto:albrecht.dress@arcor.de
    GnuPG public key:  http://home.arcor.de/dralbrecht.dress/pubkey.asc
_________________________________________________________________________

[-- Attachment #1.2: fw.sh --]
[-- Type: application/x-shellscript, Size: 426 bytes --]

[-- Attachment #1.3: tcpdump --]
[-- Type: text/plain, Size: 4783 bytes --]

[root@antares root]# tcpdump -nn -i eth0 tcp port 80
18:16:21.012143 IP 192.168.42.4.49223 > 213.95.27.115.80: S 2685214081:2685214081(0) win 65535 <mss 1460,nop,wscale 0,nop,nop,timestamp 2148180757 0>
18:16:23.779283 IP 192.168.42.4.49223 > 213.95.27.115.80: S 2685214081:2685214081(0) win 65535 <mss 1460,nop,wscale 0,nop,nop,timestamp 2148180762 0>
18:16:26.626863 IP 192.168.42.4.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1460,nop,wscale 0,nop,nop,timestamp 2148180768 0>
18:16:29.278717 IP 192.168.42.4.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1460,nop,wscale 0,nop,nop,timestamp 2148180773 0>
18:16:32.278383 IP 192.168.42.4.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1460,nop,wscale 0,nop,nop,timestamp 2148180779 0>
18:16:35.278053 IP 192.168.42.4.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1460>
18:16:38.277733 IP 192.168.42.4.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1460>
18:16:41.277416 IP 192.168.42.4.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1460>
18:16:47.276686 IP 192.168.42.4.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1460>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[root@antares root]# tcpdump -nn -i ppp0 tcp port 80 2> tcpdump.ppp0
18:16:21.012206 IP 84.44.131.113.49223 > 213.95.27.115.80: S 2685214081:2685214081(0) win 65535 <mss 1452,nop,wscale 0,nop,nop,timestamp 2148180757 0>
18:16:21.085651 IP 213.95.27.115.80 > 84.44.131.113.49223: S 2677460604:2677460604(0) ack 2685214082 win 5792 <mss 1460,nop,nop,timestamp 1472713132 2148180757,nop,wscale 2>
18:16:21.085748 IP 84.44.131.113.49223 > 213.95.27.115.80: R 2685214082:2685214082(0) win 0
18:16:23.779332 IP 84.44.131.113.49223 > 213.95.27.115.80: S 2685214081:2685214081(0) win 65535 <mss 1452,nop,wscale 0,nop,nop,timestamp 2148180762 0>
18:16:23.841268 IP 213.95.27.115.80 > 84.44.131.113.49223: S 2680216981:2680216981(0) ack 2685214082 win 5792 <mss 1460,nop,nop,timestamp 1472715888 2148180762,nop,wscale 2>
18:16:23.841326 IP 84.44.131.113.49223 > 213.95.27.115.80: R 2685214082:2685214082(0) win 0
18:16:26.626918 IP 84.44.131.113.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1452,nop,wscale 0,nop,nop,timestamp 2148180768 0>
18:16:26.689960 IP 213.95.27.115.80 > 84.44.131.113.49224: S 2688743097:2688743097(0) ack 2390183935 win 5792 <mss 1460,nop,nop,timestamp 1472718737 2148180768,nop,wscale 2>
18:16:26.690000 IP 84.44.131.113.49224 > 213.95.27.115.80: R 2390183935:2390183935(0) win 0
18:16:29.278746 IP 84.44.131.113.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1452,nop,wscale 0,nop,nop,timestamp 2148180773 0>
18:16:29.343266 IP 213.95.27.115.80 > 84.44.131.113.49224: S 2691397130:2691397130(0) ack 2390183935 win 5792 <mss 1460,nop,nop,timestamp 1472721391 2148180773,nop,wscale 2>
18:16:29.343295 IP 84.44.131.113.49224 > 213.95.27.115.80: R 2390183935:2390183935(0) win 0
18:16:32.278425 IP 84.44.131.113.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1452,nop,wscale 0,nop,nop,timestamp 2148180779 0>
18:16:32.341042 IP 213.95.27.115.80 > 84.44.131.113.49224: S 2694396243:2694396243(0) ack 2390183935 win 5792 <mss 1460,nop,nop,timestamp 1472724390 2148180779,nop,wscale 2>
18:16:32.341114 IP 84.44.131.113.49224 > 213.95.27.115.80: R 2390183935:2390183935(0) win 0
18:16:35.278094 IP 84.44.131.113.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1452>
18:16:35.339906 IP 213.95.27.115.80 > 84.44.131.113.49224: S 2697395925:2697395925(0) ack 2390183935 win 5840 <mss 1460>
18:16:35.339928 IP 84.44.131.113.49224 > 213.95.27.115.80: R 2390183935:2390183935(0) win 0
18:16:38.277765 IP 84.44.131.113.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1452>
18:16:38.334399 IP 213.95.27.115.80 > 84.44.131.113.49224: S 2700391695:2700391695(0) ack 2390183935 win 5840 <mss 1460>
18:16:38.334470 IP 84.44.131.113.49224 > 213.95.27.115.80: R 2390183935:2390183935(0) win 0
18:16:41.277463 IP 84.44.131.113.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1452>
18:16:41.334072 IP 213.95.27.115.80 > 84.44.131.113.49224: S 2703391278:2703391278(0) ack 2390183935 win 5840 <mss 1460>
18:16:41.334119 IP 84.44.131.113.49224 > 213.95.27.115.80: R 2390183935:2390183935(0) win 0
18:16:47.276735 IP 84.44.131.113.49224 > 213.95.27.115.80: S 2390183934:2390183934(0) win 65535 <mss 1452>
18:16:47.333126 IP 213.95.27.115.80 > 84.44.131.113.49224: S 2709392375:2709392375(0) ack 2390183935 win 5840 <mss 1460>
18:16:47.333171 IP 84.44.131.113.49224 > 213.95.27.115.80: R 2390183935:2390183935(0) win 0



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-05-11 18:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-06 16:36 Help: iptables NAT broken with pppoe Albrecht Dreß
2005-05-07  6:12 ` Taylor, Grant
2005-05-07 20:00   ` Albrecht Dreß
2005-05-09  5:56     ` Taylor, Grant
2005-05-09 14:08       ` Jason Opperisano
2005-05-09 18:37       ` Albrecht Dreß
2005-05-09 18:43         ` Taylor, Grant
2005-05-10 10:31           ` Andy Furniss
2005-05-10 10:36             ` Andy Furniss
2005-05-10 11:02             ` Albrecht =?unknown-8bit?q?Dre=DF?=
2005-05-10 13:19               ` Andy Furniss
2005-05-11 17:00           ` Albrecht Dreß
2005-05-11 18:39             ` Taylor, Grant
2005-05-10  3:00       ` R. DuFresne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.