Click to See Complete Forum and Search --> : Routing fun


CD
02-15-2001, 05:27 AM
I should say first that I am very new to everything Linux, so try and bear with me. I'm trying to setup linux on an old computer to be the router/firewall/whatever for my dsl connection. I installed Slackware 7.1 and configured both my network cards and can connect to the dsl in linux and everything is peachy. Now, I thought I had setup the routing properly, so that I could connect using my windows box, but I was wrong. Fropm teh Linux box I can ping both network cards in the box, and the network card in the windows box. In windows, I can ping both network cards in the linux box and also the ecternal IP that my dsl provider gives me when i connect. I can ping outside IPs from the LInux box, but not the Windows box. So I thought I should probably enable IP forwarding (forgot to do that). I did this and I still can't ping outside site from windows. So, then I did a little reading and I attempted to actually setup the routing by doing something like
route add -net 192.168.1.0 netmask 255.255.255.0 eth1 and also
route add default ppp0
I then used ipchains:
ipchains -A forward -s 192.168.1.0/24 -j MASQ
After all that I still couldn't do jack outside the local net on the windows box. Now, I know that it will work and that I'm just manually setting it up wrong, because I'm using the Linux box a gateway to connect the net right now, but the way I got it working was to select the IP Masquerading option in the adsl-setup util that roaring penquin came with. I guess that I'm jsut asking what I did wrong when doing it manually, and what file roaring penquin put the setup in so that I can look at it and learn. Thanks for your patience in reading all this, and I appreciate any help you can give.

TC
02-16-2001, 01:58 AM
Did you put your Linux inside card IP as the gateway on the M$ box? Can you ping your M$ box from the Linux box?

TC :)

CD
02-16-2001, 04:19 AM
Yes, I was able to ping every card from both boxes and the outside world from teh Linux box, but not the windows box. I do think I figured it out, though. I was putting -i eth1 in the ipchains command and it looked like in the MASQUERADE rules that roaring penquin sets up it uses either ppp0 or it doesn't include the -i option at all. So I took out the -i option alltogether and it worked just fine. Strange. I plan on getting a better firewall put in place and everyone seems to talk about PMFirewall, so I suppose I will give it a try. Don't really know of any other good ones, though. Thanks.