NAT Problems...

xtrotter

Registered
This is strange. I hope someone can help. I configured NAT on my OSX box so that the rest of my computers could access the internet via my cable modem. It was easy to set up (since I have experience using unix/linux) and it worked great. I had 2 PowerBook 5300C's, 1 X86 Win XP box, 1 LC 630 DOS Compatible Mac, 1 8100, 1 8500, and one iMac all accessing the internet via my cable modem and NAT. Then all of a sudden it quit working. I was still able to access all the computers via appleshare and even ping them all from the OSX box, but I got DNS errors when trying to browse the internet. I tried removing, and reconfiguring NAT - NO. I installed Brickhouse and allowed it to configure my ipfw - NO. I then formatted the OSX box, reinstalled 10.0, 10.1, and then all the software updates, and then re-configured NAT, and guess what. SAME THING. I am totally confused. PLEASE HELP ME! I AM GOING CRAZY. I know this works, and I am not about to go buy a Linksys router/hub to get the same results I had before. PLEASE PLEASE PLEASE! Thanks.
xtrotter
 
Perhaps everything is working ok, your clients just are pointing to a broken DNS server. Try changing the DNS server that your computers point to...try 152.1.1.206. In osx change /var/run/resolv.conf and add that in there.
 
I have tried many different DNS addresses, including the one that you gave me. I think that I may have run into an issue that will baffle everyone. heh heh. Thanks though. Any other thoughts?
 
After a few days of fighting HERE is what I did to solve the problem:

1) deleted the NAT startup script from the StartupItems directory (/Library/StartupItems)
2) flushed ipfw of all of its rules (to do this su to root and type: ipfw flush then hit y)
3) turned off my computer
4) booted my computer back up
5) executed the NAT startup script manually (sh NAT or ./NAT)
6) tested it out, and it worked.
7) placed the NAT startup script back in its original location: /Library/StartupItems and rebooted to test everything, and it is now working beautifully.
 
Did you have rules in ipfw that got flushed out? It looks like you were just blocking the traffic (probably on the way back in). I'm curious, since I have a linux box as my NAT box running iptables, but I want to learn more about ipfw. I think it has a way to accept related connections, but I don't know how it works.

Another idea of how to troubleshoot something like this is to install ethereal or another packet sniffer and look at what traffic is actually flowing back and forth through the interface.
 
The wierd thing about this is that I had already tried manually flushing everything out of ipfw before. I had even flushed everything, and the rebooted and still nothing. The only thig different this time is that I flushed everything manually, removed the nat startup script and then powered down. Then I added the rules manually to ipfw (the same ones that the nat script sets upon boot). The only thing that I can think of is that the rules were not being fully accepted by ipfw during boot. I dont know why, but that is what it looks like, because the problem stopped when I booted up with no NAT set up, and then set it up manually. Only after that did I replace the startup script. I dont know why this did it, but it did and everything is working great now. The only issue now is that I need another hub or switch for the rest of my computers! :p Anyway, I am willing to do what I can to help you out. Feel free to email me: dtrotter@dilbert.ultlra.com
Cheers!
xtrotter
 
I've been having problems with nat recently as well. It seems that my mac goes to sleep for an extended period of time, and when it comes back up, its interface will not talk to my natd-based firewall. I'm not running ipfw because I have had enough problems with that in the past.

It's a real puzzler. it's like my rules have been getting bulldozed since installing 10.1.4.
 
I had that same problem with 10.1 and a friend of mine running 10.1.4 has had the same problem. We found that by either disabling energy saver all together OR by not allowing the hard drives to sleep took care of that problem. I guess when the hard drives go to sleep and you 'wake them up' for some reasons natd ceases to work. Anyway I disabled energy saver and that fixed that, and my friend left energy saver on, but no longer allows his hard drives to go to sleep, and that fixed it for him. I hope that helps.
 
I have a theory about why the hard-disk no sleeping can help with both problems on this page. I'm watching my lease counter run down on both machines. When my mac sleeps it is completely dead to the world, a magic ping can't even wake it once the hdd is down. I wonder if it is possible that when the lease expires on the machine, that it just doesn't give up completely on that machine and consider it dead? I have to reboot my gateway when this happens because I cannot get it to renew the lease. dead to the world. I want to make the note that this has only started on 10.1.4.
 
I haven't tried with 10.1.4 yet, but I know that previously, the HD and monitor sleeping was not a problem... but the *computer* sleeping was. (ie: set the sleep to never, and then a separate sleep time for HD and monitor)
I assume that's because the doesn't listen to anything except keyboard and mouse at that point (not NIC). I believe there is a third party tool to enable "wake on LAN" for OS X, however.
 
Back
Top