Matthew Dalton <[EMAIL PROTECTED]> writes: > The laptop needs the following settings: > - Gateway - your Debian box (192.168.2.1) > - a route to the 192.168.2.x network > > The Debian box needs: > - forwarding enabled > - Gateway - your FreeBSD pc (192.168.1.1) > - a route to the 192.168.2.x network > - a route to the 192.168.1.x network
Mathew, thanks for your reply. I'm having a bit of a trouble here. I did on the Debian box to enable IP forwarding: echo "1" > /proc/sys/net/ipv4/ip_forward echo "0" > /proc/sys/net/ipv4/conf/all/rpfilter Then I did on the laptop: route add default gw 192.168.2.1 ,----[ Debian box's routing table ] | tea:/usr/home/antipode$ /sbin/route -n | Kernel IP routing table | Destination Gateway Genmask Flags Metric Ref Use Iface | 172.16.160.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1 | 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 | 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 | 0.0.0.0 192.168.1.1 0.0.0.0 UG 1 0 0 eth0 `---- ,----[ The laptop's routing table ] | espresso:~$ /sbin/route -n | Kernel IP routing table | Destination Gateway Genmask Flags Metric Ref Use Iface | 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 | 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo | 0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0 `---- Then I'm trying to ping 192.168.1.1 from the laptop, and can't. Traceroute to that address stops at 192.168.2.1, so I guess that the request is routed correctly, but the Debian box wouldn't forward it. Could somebody point me in the right direction? Thanks in advance! > > Hi. I've just got a laptop computer. I already have a two-computer > > network running with a FreeBSD box doing NAT and firewalling, and a > > Debian box behind it. I need to obtain means of connecting my notebook > > to the 'net. > > > > Because I'm too cheap to buy a hub, and also because I have a bunch of > > networking cards lying around (that don't match), I put an extra NIC > > into the Debian box and connected the laptop to it. The network works > > fine. Laptop has IP 192.168.2.2, Debian box has IPs 192.168.2.1 (to > > the laptop), and 192.168.1.2 (to the firewall). The FreeBSD box has an > > IP of 192.168.1.1 on the inside, and a real IP on the outside. > > > > My question is: what do I want to do with my Debian box so that the > > laptop could talk to the 'net? As far as I understand, I just need to > > configure it a router (to route all traffict from 192.168.2.2 through > > 192.168.1.1), correct? > > > > Also, will I need to modify anything on my firewall? Do I need to add > > a routing entry for 192.168.2 network? I'm afraid it would try to look > > for it in the outside... > > > > FWIW, the laptop runs Slackware. -- Arcady Genkin http://www.thpoon.com Nostalgia isn't what it used to be.