Click to See Complete Forum and Search --> : Local DNS is out. From my hardware firewall out it's fine??


carlos123
03-11-2003, 04:34 AM
How can I set the DNS IP that my Linux computer will use? Through the command prompt?

I want to bypass the hardware firewall that I have set up for my local network and use my ISP's DNS directly but I don't know how to set that up.

I used ifconfig to set up my Linux box IP address, the broadcast and the netmask addresses. Is there another utility that tells my Linux computer where to resolve DNS queries that I can set? Or a configuration file that I can edit?

I don't have a clue as to how I was able to use DNS since I set things up. I never really indicated where the DNS server was at. At least I don't remember doing so. And things have worked okay since until yesterday.

Yesterday I applied some patches to my Smoothwall firewall and DNS started to get real flaky until it failed completely a couple of hours ago. At least within my local network.

From my firewall out it's fine.

I can ping to IP addresses from my Linux box but not to domain names. From my firewall I can ping to both IP's and domain names out to the Internet (through an SSH tunnel to my firewall).

Any suggestions or ideas as to how I can resolve this?

I am using Gentoo.

Thanks.

Carlos

chrism01
03-11-2003, 09:25 AM
Put your ISP DNS server IPs in /etc/resolv.conf

kedman
03-11-2003, 09:36 AM
Put all your DNS in /etc/resolve conf
on all your boxes
If you can ping ips but not address your not hitting any nameservers
nameserver 194.168.8.100
nameserver 194.168.4.100
nameserver 217.204.38.5
good luck
kedman

carlos123
03-11-2003, 09:07 PM
Thanks very much to both of you!!

I am back in business again. Able to connect to the Internet and surf.

The fix did involve making changes to my /etc/resolv.conf file but the last time I made changes they didn't take when I did "/sbin/ifconfig eth0 down" followed by "/sbin/ifconfig eth0 up".

This time I rebooted the computer!

Is there a way to have changes made to /etc/resolv.conf take effect without having to reboot the computer?

Any further insight on this would be appreicated.

Thanks again!!

Carlos

bwkaz
03-11-2003, 10:23 PM
They should take effect immediately. You shouldn't even have to bring the interface down.

:confused:

Oh, wait a minute. Is your network set with a DHCP server? "ifconfig eth0 up" won't request a DHCP address; you would have to start your DHCP client program for that.

Or, failing that, I believe "ifconfig eth0 up" can take a few more arguments for things like the gateway to use for traffic, the IP of the interface, the subnet mask, and the broadcast address. Perhaps the problem was that these weren't being set when you did "ifconfig eth0 up"?

If the problem was either of these, then a service network restart (on RH) or an /etc/rc.d/init.d/network restart (on any other SysV-init system) should properly restart the network interface, with the right DHCP, gateway, broadcast, subnet, etc. options.

carlos123
03-11-2003, 11:38 PM
Thanks for those tips bwkaz! Great stuff!

Just that little bitty command line of "/etc/rc.d/init.d/network restart" is worth its length in gold! I wouldn't have even known where to look for that little bit of Linux gibberish :). In all the looking around that I have ever done on Google and elsewhere I have never once come accross any discussion or description of how to restart one's network. Much less the command line you gave me.

By the way my internal network does not use DHCP to assign it's IP addresses. I set them manually as static IP's since I only have three computers on it. My Smoothwall firewall CPU does get it's Internet IP's through DHCP coming from my ISP.

Thanks again.

These forums are a real life saver!!

Carlos

Magueta
03-12-2003, 12:39 AM
The network script is great and I'm sure that it brings the interface up and down safely, but if you look at the script it doesn't really do anything outside of checking for ipv6 and the ifup and ifdown commands for all the interfaces. If you do an ifdown and an ifup with DHCP I believe it requests the information from the DHCP server but I'm not sure. However, if it isn't done by bringing the interface up then what requests the information from the DHCP server.

Joe

bwkaz
03-12-2003, 10:15 AM
True, if you have ifdown and ifup scripts (I don't -- LFS 3.3).

If not, then you'd have to use the network script itself.

;)