Click to See Complete Forum and Search --> : dsl modem and static IPs
gjansky
01-06-2001, 01:24 PM
I'm have a linux box as an internet server for a small lan. My ISP gave me two staic IPs, one for the dsl modem, and one for the machine. Let's say the dsl modems IP is XXXX and the machine is YYYY. Currently, I have the server set up as:
eth0 = 192.168.0.2
eth1 = YYYY
and the dsl modem as XXXX
I have an ipchains firewall created and I forward everything from eth0 to eth1. I'm pretty sure this is correct. Am I right? My other thought is to forward from eth0 to eth1 to dsl modem. That doesn't sound right. One of the problems I'm troubleshooting is: computers on the lan can not get out to the internet using Netscape.
Thanks for any help.
Greg
mdwatts
01-06-2001, 01:30 PM
I'm not a networking guru, but have you setup a gateway address? Usually 192.168.0.1 and then point Netscape to the gateway or if in Windows, set TCP/IP to use the gateway. I also put the gateway and DNS servers in the DNS server config of TCP/IP.
gjansky
01-06-2001, 01:38 PM
Thanks for the quick reply.
Yes, on the windows machines, I point to the eth1 address as the gateway. Is that correct?
mdwatts
01-06-2001, 02:41 PM
If you are using ipmasquerading (NAT), then I think you use the gateway on eth0. I've never set it up on Linux as I use a Novell Service at home for my cablemodem. You would think I would know by now, reading all the posts here everyday.
There are some NHF's here on basic routing and ipchains here http://www.linuxnewbie.org/nhf/intel/network/index.html that may help.
There's also more stuff here http://linux.nf/stepbystep.htm and also here on cablemodems for Linux (dsl & cablemodems are much the same) http://www.cablemodeminfo.com/linbasics.x.html-ssi
Post back if you are still having problems.
gjansky
01-06-2001, 09:11 PM
Ok, I have an idea where this troubleshooting is going, but I'm not 100% sure.
I checked the lan clients and all seemed ok there. So I rebooted the server to see what occured.
After the firewall engaged, I watched named start. After starting, the traffic light, and the lan_interface_1 light were blinking on the dsl modem. A quick check of the logs showed no errors, or denied/rejected packets resulting from dns queries.
I could ping eth0 (lan interface), eth1 (external interface), other machines on the lan (192.168.0.*), and the dsl modem, but nothing else. So, I started going through the routing NHF that you posted above.
I did a netstat to see my routing tables....empty. I tried route add gw default <eth1 address> and the machine hung.
I found the static-route file, and noticed that it was empty.
I picked up my Running Linux book and read the sections on TCP/IP networking and routing. The book mentioned a file rc.inet1, which dealt with a networking, specifically where you stipulate the gateway. I couldn't find this file.
So, I guess my question is, how can I add the static routes and gateway? I don't think the machine should hang when I use the route command. Additionally, are there different files I can use if I don't have rc.inet1?
Thanks for your time.
Greg
BTW, this is a Red Hat 6.0 machine, with 2 3c509b cards.
LordStanley
01-07-2001, 12:36 AM
[QUOTE]Originally posted by gjansky:
[B]I'm have a linux box as an internet server for a small lan. My ISP gave me two staic IPs, one for the dsl modem, and one for the machine. Let's say the dsl modems IP is XXXX and the machine is YYYY. Currently, I have the server set up as:
eth0 = 192.168.0.2
eth1 = YYYY
and the dsl modem as XXXX
Why 2 ip addresses? 1 for modem and on for the box?? Thats weird?
i have a simalar set up this is what i did and it works great for me.
my linux box has 2 nic cards eth0 & eth1.
eth0 is set to the static ip and the modem plugs into that. eth1 is set to the internal lan ip address 192.168.0.1 and it plugs into a small hub.
I'm running the pppoe program i got from roaring penguin.com also i have PMfirewall running WITH ip masquerading and portsentry.
my windows boxes are set up like this
192.168.0.2 (and .3)with the gateway of 192.168.0.1(eth1) i dont know if you need this but i enabled dns and put in the info.
As long as your linux box is connected to the internet you should be able to get out on the windows boxes.
good luck!!
Bob
njcajun
01-08-2001, 03:04 PM
I have this setup...
The 'modem' is actually a router. It moves packets to the name servers on your ISP's network. What you need to do is...
connect either of your NICs to the modem - this is your EXTERNAL INTERFACE and doesn't matter if it's eth0 or eth1 at all.
The other NIC is plugged into a hub and is your INTERNAL INTERFACE.
NOW:
The IP address your ISP gave you for your machine is gonna be the IP address for your EXTERNAL INTERFACE!
Assign a private network IP to your INTERNAL INTERFACE (like 192.168.2.1). It doesn't have to be in the same subnet as the external interface - which is probably publicly routable.
Now you have to use 'route' to add a default gateway, which is actually going to be the iP of the modem.. 'route add default gw <ip of modem>'
Now you go to your LAN and make THEIR gateway=the ip of your INTERNAL INTERFACE!
I may have skipped a couple things - but follow this and you should be pretty close - email me if you have more issues.
------------------
Build a system that even a fool can use, and only a fool will use it.