Date: Wed, 29 Aug 2001 21:01:13 -0500 From: Dan Thill <thill@umr.edu> To: freebsd-questions@freebsd.org Subject: NAT'd machine can't resolve hostnames Message-ID: <3B8D9E69.C6D52866@umr.edu>
next in thread | raw e-mail | index | archive | help
I've read the FAQs, the Handbook, the Archives, lurked for a few weeks, and even sacrificed a chicken or three. However, I'm still stuck. I have two PCs, 192.168.0.1 and .2 both running FreeBSD 4.3. I'm using user-land PPP to provide NAT to the Machine 2. I have PPP working perfectly already. The two machines can see and talk to each other on the network via hostnames and IP's fine. However, when Machine 1 is connected to my dialup ISP, Machine 2 can only resolve sites by IP address. For some reason, Machine 1 isn't resolving the hostname (or passing it on to my ISPs DNS servers to be resolved). Machine 1's resolv.conf is updated for each connection (as it should be), and if I copy the nameserver address to the resolv.conf of machine 2, PRESTO! It can resolve names. My question is: is there anyway that Machine 2 can get the new nameserver addresses from Machine 1, or have Machine 1 forward the resolutions on to the ISP (or something like that... I'm not quite up to par on how all this works)? Or do I have to use bind or routed? (I'd prefer to use neither). I would resort to just editing Machine 2's resolv.conf, but I'm in a situation where I switch between several ISPs on a daily basis. And I KNOW there is a way to so this, because: Machine 1 is a dual boot with Win2k (only until I learn FreeBSD enough to ditch it!), and when I use Modem Sharing from it, Machine 2 can resolve names fine, as long as I specify Machine 1's IP in the resolv.conf. But this doesn't work when Machine 1 is in FreeBSD. And yes, I have set: Machine 1: gateway_enable = "YES" ppp_nat = "YES" ppp_mode = "auto" ppp_profile = "something" forward_sourceroute="YES" # not sure if I need these, accept_sourceroute="YES" # but it helped/hurt anything Machine 2: defaultrouter= (machine 1's IP) I've checked the route tables for both machines, and the default route for Machine 2 is Machine 1, and Machine 1's default route is set to the ISP. This seems logical to me. I'm thoroughly stumped here. I'm sure its something simple. IP resolution works fine... just not name resolution - unless Machine 1 is using Win2k's modem sharing. Go figure. I would have thought it would have been harder to get Win2k and FreeBSD playing together than vice versa :) Thanks in advance for your help. -- [-] Daniel Thill (University of Missouri - Rolla) [-] thill@umr.edu - http://www.umr.edu/~thill [-] "Beauty in distress is much the most affecting beauty." - Edmund Burke To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B8D9E69.C6D52866>