natd failing to start because tun0 interface not up

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:
Code:
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?
 
RTFM? See the --up and --down parameters. If you're dropping privileges with --user you will need to get creative with --down (ie. sudo).
 
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.
 
Back
Top