Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142
Rep:
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....
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
PING www.linuxquestions.org (64.179.4.146) 56(84) bytes of data.
64 bytes from web2.linuxquestions.org (64.179.4.146): icmp_seq=1 ttl=43 time=43.7 ms
64 bytes from web2.linuxquestions.org (64.179.4.146): icmp_seq=2 ttl=43 time=43.2 ms
64 bytes from web2.linuxquestions.org (64.179.4.146): icmp_seq=3 ttl=43 time=43.4 ms
Try pinging 64.179.4.146 directly or typing that into your browser and see if you can connect here.
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142
Original Poster
Rep:
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).
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
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.
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142
Original Poster
Rep:
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!
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.