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.
I am a school net admin. I have 4 linux nat firewall boxes on 4 seperate networks all plugged into one WRT54G with the wireless function disabled. The WAN port is DHCP to my ISP modem (comcast.) WRT54G is set to gateway mode. WRT54G is not handing out IP's to clients, DHCP set to disable. Modem is a bridge and hands out dynamic internet routable ip addresses. All 4 linux boxes eth0 are static ip's and go to the WRT54g. Each Linux box is a dhcp nat firewalled router to my clients. Problem: DNS is not being resolved to my ISP from my clients. I can ping from a client to any where on the net or through my system. Tried placing the ISP DNS numbers in the /etc/resolv.conf file of servers but did not work.
Question does the WRT54G nat translate the ISP's DNS numbers also and to what? If so placing those numbers in the /etc/resolv.conf might solve the issue. Last bit of info. On one system there is 32 clients using win7 and dhcp. Some clients can surf all the time. Some never, some intermitently. IF I restart the server the above will applies to different clients. The same thing happens on the other 3 server systems. Attaching the Linux box directly to the modem and setting eh0 to DHCP I have no problems. I know it's not the linux boxes. It's placing the WRT54G between the modem and the Linux box that creates the loss of DNS resolution. Anyone with any ideas would be much appreciated.
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296
Rep:
Hi Alanbh, Welcome to LQ. Maybe I'm misunderstanding something, but with the modem bridged and the WRT54g not handling DHCP, is each of the Linux routers pulling an external IP from Comcast?
Linux Routers are set to static ip. You can set a WRT54G to DHCP and it will hand out ip's in the range you set for plus you can still plug in or wirelessly assign static ip's to clients and the WRT54G will nat translate those ip's back through it's self to the WAN port which is connected to the modem. You can also turn off DHCP and use static IP's from your clients as in my case, the Linux router being the clients, and the WRT54G will back nat translate the static ip's through the WAN port to the modem. I get only one dynamic address from the modem. The WRT54G is acting as a router giving me more routable lan addresses that I am forcing it to give me by using static ip's on each client. I tried changing the /etc/resolv.conf this morning to the WRT54G ip and the system worked better but still not correctly. My next step is to do a firmware up grade. One post I read said the DNS numbers are also nat translated to the ip of the WRT54G box along with the routable external ip from the modem. It's an interesting problem!
Tnx for Input. Haven't tried that yet. Found out the following. If I set up a temporary static ip on WRT54G WAN Port with the gateway and dns numbers set in and then set the client DNS numbers to the ip of the WRT54G box the system works perfectly. Only when I set the WAN port to DHCP the system will not resolve DNS. Spoke to COMCAST teck at length who was very network intellegent. He was as puzzled a me. When I look at the status window of the WRT54G in DHCP mode it shows a Gateway of 0.0.0.0 which is incorrect. It should show the gateway from the comcast modem. Also it does not show the real DNS numbers from the comcast modem but instead the ip of the box. Both of which the comcast tech said should not be happening. Tried a second WRT54G got the the same results. Borrowed a third WRT54G from friene last night and hooked it up to my Broadstripe modem at home. Did status window check on it and it showed the IP, Gateway, and DNS numbers all correctly. Plus it worked fine when I hooked a client to it. About ready ot try this WRT54G at school. Will post results. I have a suspision! Thankys again.
Yea. Looks like one or possibly two bad WRT54G routers. The third one shows all the correct data in the status window and and can even be hooked to the client side of my Linux box nat firewall dhcp server. With client hooked to WRT54G in above config I can surf the net. Next will try flashing the firmware again of the bad WRT54G or maybe dropping back one revision and flashing.
I have version 8.2 and would like to try DDWRT. It might fix this modem. I will probably try DDWRT next week. Looks somewhat complicated. Could not find which file to down load from site when clicked on WRT54G ver8.2 It recommends a file but I can't find file or where to down load it on site.
Flashed Firmware in old WRT54G 4 times still no good. Got a new WRT54GL at very good price. Hooked it to Comcast box did a hard reset then looked at status window. Everything appeared. Ip, Gateway, both DNS numbers from ISP and dhcp info. All works fine. New WRT54GL solved the issue. Principal very happy. Any advice about loading DDWRT on old router would be appreciated. Wiki only gives instructions for ver 4.1. Tnx again.
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296
Rep:
Glad that worked out for you. The "L" models have a bit more flash and ram and also run a Linux based firmware (for what it's worth). The DDWRT wiki page for the 8.2 is here.
TNX again for info on DDWRT. I will try this morning. One last thing about my system which may help others reading these threads.
Comcast modem feeds WRT54GL. The WRT54GL statically feeds 4 linux nat firewall client side DHCP servers. This gives me four separate network systems so that if one network gets sick (virus or attack) the entire system does not go down plus it keeps the student from hacking the admin or teachers computers!!
When the WRT54GL or WRT54G is working properly it obtains an Ip address, Gateway address, two DNS address and DHCP address from the Comcast box, all of which are viewable from the Status window in the setup screen.
If you are connecting to the WRT54G/GL using static IP in your Linux box THEN YOU MUST SET the IP box address of the WRT54G or GL in the /etc/resolv.conf file or the system will not resolve DNS numbers. PeaceDog indicated this in a few threads back and I have confirmed it. Putting the ISP's DNS numbers in the /etc/resolve.conf will not work.
Hope these threads will help someone else also. Thanks again PeaceDog.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.