Getting masquerading working on 2.3.18 and DSL

Matt mmaynard@wronski.math.uwaterloo.ca
Thu, 30 Sep 1999 11:13:25 -0400 (EDT)


-- Warning  Long message ---

Hi,

	I am attempting to get my 486 linux gateway to provide
masquerading services to the other mahcines in the house over my ADSL
link.  My ISP uses PPPoE (PPP over ethernet -- yuk!) and to get the
gateway even connected to the net I have to use the 2.3.X series of
kernels.  I have used this machine before (running 2.2.X) in this role on
a cable modem, and everything was peachy.  

	The machine currently has the following interfaces :

lo - local loopback
eth0 - connected to DSL modem, but has no addr set (ifconfig eth0 0.0.0.0
arp)
eth1 - local network 192.168.1.1
ppp0 - has the actual IP on the outside world (dynamically assigned)

	I have downloaded and built the netfilter 0.19 distribution and
then I started to read the ipnatctl HOWTO
(http://netfilter.kernelnotes.org/ipnatctl-HOWTO.html). I modprobed the
ip_nat module and issued the command :

# Insert a rule (-I) to masquerade (-m masquerade) the source (-b source)
# of any packet coming from the internal network (-s 192.168.1.0/24).
ipnatctl -I -s 192.168.1.0/24 -b source -m masquerade

just like in the howto, ipnatctl -L showed the rule in place and so I
decided to hop to the other machine (linux 2.2.12) and try to get to the
outside world.  Nothing.  a traceroute doesn't even show the first hop as
being the gateway (192.168.1.1). 

	Does anyone have any tips on how I can get masquerading working on
my machine? Is there something I over looked or did incorrectly.  FYI the
machine is Debian 2.1r1 running on a 486-66 w/ 20 Mb RAM. Also, i added
the /usr/local/lib/ipnatctl and /usr/local/lib/iptables directories to the
library path (/etc/ld.so.conf)

	

I decided to restart the gateway and try again today.  Again I modprpbe
the ip_nat module and the following ensues :

--- Error log ---

Gatekeeper:~# ipnatctl -L
cat: /proc/net/ip_nat_rules: No such file or directory
Gatekeeper:~# modprobe  ip_nat
/lib/modules/2.3.18/net/ip_nat.o: init_module: Device or resource busy
Segmentation fault

[ ... ]

Gatekeeper:~# modprobe  ip_nat
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_module
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol __reserve_ip_conntrack
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_destroyed
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_get
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_hash
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_alter_reply
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_find_get
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_put
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol invert_tuplepr
ip_conntrack: No such file or directory
Gatekeeper:~# depmod -a
Gatekeeper:~# dmesg

[...]                                   

PPP BSD Compression module registered
PPP Deflate Compression module registered
ip_fw_compat v0.1.9
ip_conntrack.o v0.1.9
ip_conntrack.o v0.1.9
ip_nat_init: can't setup rules.
ip_fw_compat v0.1.9
ip_conntrack.o v0.1.9
ip_conntrack.o v0.1.9
ip_nat_init: can't setup rules.
Unable to handle kernel paging request at virtual address c18645e0
 printing eip:
c18645e0
*pde = 01316063
*pte = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c18645e0>]
EFLAGS: 00010082
eax: c18645e0   ebx: c0a5ee30   ecx: 00000086   edx: c0a5ee88
esi: 000001a8   edi: 00000035   ebp: c08e5f58   esp: c08e5f54
ds: 0018   es: 0018   ss: 0018
Process modprobe (pid: 575, stackpage=c08e5000)
Stack: c0a5ee4c c08e5f78 c18566a3 c0a5ee30 c0a5ee30 00000000 c1855000
00000000
       00000286 c08e5f84 c1855445 c1855000 c08e5f90 c18554ea 00000000
bffffd0c
       c0115c00 c1855000 fffffff0 0804fc21 c01150e2 c1855000 00000000
c08e4000
Call Trace: [<c18566a3>] [<c1855000>] [<c1855445>] [<c1855000>]
[<c18554ea>] [<c0115c00>] [<c1855000>]
       [<c01150e2>] [<c1855000>] [<c0107ff4>]
Code: <1>Unable to handle kernel paging request at virtual address
c18645e0
 printing eip:
c01083f7
*pde = 01316063
*pte = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c01083f7>]
EFLAGS: 00010086
eax: c18645e0   ebx: 0000002b   ecx: c08e5f18   edx: c12ca000
esi: 00000000   edi: c08e6000   ebp: c1800000   esp: c08e5ec0
ds: 0018   es: 0018   ss: 0018
Process modprobe (pid: 575, stackpage=c08e5000)
Stack: c08e5f18 00064000 c2000000 c0108460 c08e5f18 c01be3ff c01bf91a
00000000
       00000000 c010d110 c01bf91a c08e5f18 00000000 c08e4000 000001a8
00000035
       c08e5f58 c08e4000 00000011 c01080f9 c08e5f18 00000000 c0a5ee30
00000086
Call Trace: [<c2000000>] [<c0108460>] [<c01be3ff>] [<c01bf91a>]
[<c010d110>] [<c01bf91a>] [<c01080f9>]
       [<c18645e0>] [<c18645e0>] [<c1855795>] [<c18566a3>] [<c1855000>]
[<c1855445>] [<c1855000>] [<c18554ea>]
       [<c0115c00>] [<c1855000>] [<c01150e2>] [<c1855000>] [<c0107ff4>]
Code: 0f b6 04 06 50 68 f7 e3 1b c0 e8 fa a3 00 00 83 c4 08 46 83
Gatekeeper:~# cd /lib/modules/2.3.18/
Gatekeeper:/lib/modules/2.3.18# ls
block        cdrom        fs           misc         modules.dep  net
Gatekeeper:/lib/modules/2.3.18# cd net
Gatekeeper:/lib/modules/2.3.18/net# ls 
Gatekeeper:/lib/modules/2.3.18/net# ls
8390.o                   ip_nat_map_static.o      ipt_tcp.o
bsd_comp.o               ipchains.o               ipt_udp.o
dummy.o                  ipchains_core.o          ipt_unclean.o
ip_conntrack.o           ipt_LOG.o                iptables.o
ip_conntrack_ftp.o       ipt_QUEUE.o              ne.o
ip_defrag.o              ipt_REJECT.o             netfilter_dev.o
ip_nat.o                 ipt_icmp.o               ppp_deflate.o
ip_nat_ftp.o             ipt_limit.o              smc-ultra.o
ip_nat_map_masquerade.o  ipt_mac.o                smc-ultra32.o
ip_nat_map_redirect.o    ipt_state.o
Gatekeeper:/lib/modules/2.3.18/net# modprobe ip_nat_map_masquerade
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_module
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol __reserve_ip_conntrack
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_destroyed
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_get
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_hash
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol
ip_conntrack_alter_reply
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_find_get
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol ip_conntrack_put
/lib/modules/2.3.18/net/ip_nat.o: unresolved symbol invert_tuplepr
ip_conntrack: No such file or directory
ip_nat: No such file or directory


---- End Error log -----


	Anyways, I could really use some help to get masq working on this
machine.  Anything you can think of would be great.  Thanks a lot.

Matt Maynard
----
3B CS University of Waterloo


PS : sorry about the huge posting.