|
|
On Wed, Mar 03, 2004 at 10:40:09PM -0500, Bradley Alexander wrote:
> At the command line, it works fine:
>
> [root@neghvar storm]# openvpn --mktun --dev tun0
> Wed Mar 3 22:37:17 2004 0[0]: TUN/TAP device tun0 opened
> Wed Mar 3 22:37:17 2004 1[0]: Persist state set to: ON
>
> I tried this approach in a couple of ways. First I added it to my openvpn config as
>
> dev tun
> mktun
>
> I then tried adding it to /etc/init.d/openvpn, as
>
> start_vpn () {
> $DAEMON --mktun --dev tun0 --daemon --writepid /var/run/openvpn.$NAME.pid \
> --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || echo -n " FAILED
> ->"
> echo -n " $NAME"
> }
>
> Both cases, openvpn gave me
>
> Mar 3 22:27:03 neghvar openvpn[716]: Options error: options --mktun or
> --rmtun should only be used together with --dev
>
> Should I run the openvpn --mktun --dev tun0 before starting the regular openvpn command?
Yep. I run it during my primitive bridge setup init.d script
which is run after the normal networking startup.
=================
#!/bin/sh
# OpenVPN startup script
/usr/sbin/openvpn --mktun --dev tap0
/usr/sbin/brctl addbr br0
/usr/sbin/brctl addif br0 tap0
/usr/sbin/brctl addif br0 eth0
/sbin/ifconfig tap0 0.0.0.0 promisc up
/sbin/ifconfig eth0 0.0.0.0 promisc up
/sbin/ifconfig br0 192.168.0.51 netmask 255.255.255.0 broadcast 192.168.0.255
/etc/init.d/firewall start
=================
____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users
|