PDA

View Full Version : natd failing to start because tun0 interface not up


dfarrington
September 27th, 2009, 15:53
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
September 28th, 2009, 00:07
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
September 28th, 2009, 02:08
And how do I do that?

aragon
September 28th, 2009, 03:27
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
September 28th, 2009, 03:44
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
September 28th, 2009, 04:19
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. ;)