# natd failing to start because tun0 interface not up



## dfarrington (Sep 27, 2009)

I have a FreeBSD box that has a tun0 openvpn interface which I route all my outgoing network traffic over.  This works great, in fact much better than with a debian installation on the same box.  I am extremely happy with it.

However, I have one issue with my setup.  When/if I reboot (which I had to do tonight because of power loss), I have to manually start natd with the following command: 
	
	



```
natd -n tun0
```
 presumably because when natd was  attempting to start using the tun0 interface, tun0 hadn't actually been created yet.

How do I get natd to wait to start until the tun0 interface has been created by openvpn?


----------



## aragon (Sep 28, 2009)

dfarrington said:
			
		

> How do I get natd to wait to start until the tun0 interface has been created by openvpn?


Don't.  Setup openvpn to start/stop natd itself.


----------



## dfarrington (Sep 28, 2009)

And how do I do that?


----------



## aragon (Sep 28, 2009)

RTFM?  See the --up and --down parameters.  If you're dropping privileges with --user you will need to get creative with --down (ie. sudo).


----------



## dfarrington (Sep 28, 2009)

OK, thanks for the help, but I have read the manual and obviously missed the section about --up and --down. 

I was going to write something about your quick usage of 'RTFM', but I concede that I probably didn't read as much as I could.  In the future, consider removing the 'F' from 'RTFM', so it might be a bit more respectful.  After all, I'm only asking for advice, and not looking to get berated for it.

But thanks all the same.


----------



## aragon (Sep 28, 2009)

dfarrington said:
			
		

> In the future, consider removing the 'F' from 'RTFM', so it might be a bit more respectful.


The 'F' has many meanings.  No need to assume the worst.


----------

