PPP with IP masquerading over a null modem
I'm trying to connect two machines, near and far, via a null modem plugged in to /dev/ttyS0 on each, using PPP and IP masquerading so they can share my ethernet connection. For
IP masquerading, I'd like the near machine to be 192.168.1.1 and the far machine to be 192.168.1.2. My lan is Class-C.
Each machine is configured to plug into my lan, but I only have one IP address so only one can use the lan at a time.
/etc/ppp/options.ttyS0:
*near machine*:
/dev/ttyS0
persist
bsdcomp 15,15
crtscts
115200
asyncmap 0
local
lock
192.168.1.1:192.168.1.2
-pap
*far machine*:
/dev/ttyS0
persist
bsdcomp 15,15
crtscts
115200
asyncmap 0
defaultroute
local
lock
192.168.1.2:192.168.1.1
-pap
Routing tables:
*near machine*:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
default x.x.x.1 0.0.0.0 UG 1 0 0 eth0
*far machine*:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 1 eth0
127.0.0.0 * 255.0.0.0 U 0 0 1 lo
default x.x.x.1 0.0.0.0 UG 1 0 1 eth0
where x.x.x.1 is my lan's gateway.
Interface configs:
*near machine*:
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:x.x.x.x Bcast:x.x.x.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13952 errors:0 dropped:0 overruns:0 frame:0
TX packets:4880 errors:0 dropped:0 overruns:0 carrier:0
collisions:91 txqueuelen:100
Interrupt:3 Base address:0x240
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
*far machine*
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:x.x.x.x Bcast:x.x.x.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:10
Collisions:0
Interrupt:9 Base address:0x300
where x.x.x.x is my IP and x.x.x.255 is my lan's broadcast address.
The near machine is a potato running kernel 2.2.8 with IP masquerading enabled and IPMasq modules loaded, the far machine is running slink with the default kernel 2.0.36 and IPMasq
modules loaded.
I'm not sure of what changes need to be made to the routing tables and the interface configs, other PPP files I need to configure, and startup files that I should be modifying to
make these changes sticky (/etc/init.d/network ?).
I am not a complete newbie...but take it slow =).
Any help is greatly appreciated.
Thanks in advance!
Nathaniel
Reply to: