changed to static Ip and now can't get internet
Hi
I've been struggling on this now for a couple of evenings and can't work out what I've done. I used to have my server connecting to a cable modem using dhcp. I've just got a new modem with 4 ports, so thought it would be good to create a bit of a network through that, rather than multiple nic's. It is an old Red Hat 7.3 (yes - past its sell by date) with two nic's. All lan ip's are static. This is exactly what I have done (no more - no less) Changed ifcfg-eth0 to: DEVICE=eth0 ONBOOT=yes BOOTPROTO=none IPADDR=192.168.0.200 NETMASK=255.255.255.0 NETWORK=192.168.0.0 #GATEWAY=192.168.0.50 (I rem'd this out just to see if it made a difference) ifcfg-eth1 is the same as before but uses a static address in the 10.0.0.x range. Nothing is currently connected to this. /etc/sysconfig/network is: NETWORKING=yes HOSTNAME="Monty" GATEWAY="192.168.0.100" (the router address) I can ping other pc's on the network and can ssh into the 7.3 box from any of the other PC's, but I cannot get the 7.3 box to make its way out onto the net. I've turned off all firewalling on the 7.3 box. All other PC's can get straight out on the net without issue. As I said, I have not done anything esle. What have I forgotten to do? It's worked fine for the last 4 years until I made the changes.... |
For starters try:
BOOTPROTO=static and the Gateway should correspond to your router ip, i.e.: GATEWAY=192.168.0.100 Also, if you can ping numeric ips on the internet but not names, you have a DNS problem and have to edit /etc/resolve.conf to add the ip for the DNS server from your ISP. To help with checking that: Code:
$ ping -c3 www.linuxquestions.org |
Thanks - I had changed the ip of the router to play around a bit. I've now un-remarked it and set it to the same in both cases.
I have also changed back to static. I changed to "none" because RH 7.3 release notes stated that was the correct setting (they didn't even list static!) Even direct ip addresses do not work, either ping or in a browser, so whatever it is, it still isn't getting out. I would blame the router, but all the other clients can get out fine). |
Have you set the DNS IP value?
Use this address to see if you can get ggogle to pop up. http://216.239.39.99/ Check /etc/resolv.conf for that. Example. nameserver xxx.xxx.xxx.xxx If you do not know the IPs from your provider then use the lan side gateway IP. Normally the default gateways on most store bought routers I have sen been like 192.168.0.1 or 192.168.1.1 depending on class C range choosing. You may have changed it or this is standard for that model. Can be done so many ways. |
Thanks again. Yep DNS is set correctly. resolv.conf has both primary and secondary dns servers in.
|
Did the google ip from a web browser bring it up?
Only other thought if IP and gateway correct is maybe mac filtering or ip filtering enabled. Brian1 |
You are spot on!!!
MAC filtering was the problem. I guess I must've been getting tired and was confused by the ability of the server or the clients to talk to each other (ssh) no problem. The server just couldn't get out - and that was why. I had set up MAC filtering but got the MAC of the server one character out! Brilliant - and thank you. |
I ran into the same thing on my network one day. Tried adding another machine to do some repair on and could not get it to work. Worked on that for about 2 hours and said I going to bed. I was laying there running my network through my mind and bam MAC FILTERING. Got up and added to the filter bam online.
Glad it is working now. Happy to be of help. Brian1 |
All times are GMT -5. The time now is 05:39 PM. |