Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have InternetSharing enabled on my Mac (Leopard), so that my iPhone can get access to the internet in a wireless environment. Every second or so, I get the following error sent to system.log:

7/2/09 2:12:33 PM natd[20861] failed to write packet back (No route to host)

Sometimes, the error is

7/2/09 2:12:33 PM natd[20861] failed to write packet back (Host is down)

Is there some way to either fix the problem that is causing these errors (which I'm guessing is because the iPhone doesn't maintain a wireless connection when not in use) or to prevent them from being logged?

Thanks, Ricky

share|improve this question

2 Answers 2

Your assessment of why the error is occurring seems logical, although I haven't given it much thought. Let's assume it is benign and that you just want to suppress the error.

natd is run by the InternetSharing daemon which is run by launchd. You can manually look at the settings for InternetSharing at /Library/Preferences/SystemConfiguration/com.apple.nat.plist and you might be able to change some settings to make it ignore the situation you're seeing. Look at the man pages for InternetSharing and natd for all of the configuration options.

You also have the option of changing the syslog configuration to reroute natd chatter to a different file, or ignore it altogether. You'll need to read man syslogd and edit /etc/syslog.conf.

share|improve this answer

If you phone is jailbroken, make sure you aren't running Cydia updates. They caused a lot of natd log spam with their periodic updates when I used to run my iPhone off my iMac to have WiFi. I'm assuming you're consistently having these errors, so there's something beyond just periodic updates.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.