I'm having trouble setting up OpenVPN on my server running CentOS 6.2. I have used OpenVPN on this server before and it worked (although that was with Ubuntu, now I'm using CentOS). I just reformatted the hard drive and am trying to get OpenVPN up and running again. I use the
down directives in my OpenVPN config file to setup my bridge. For some reason when the
up script runs, I get a permission denied error when trying to execute
brctl. Here's my config file:
mode server tls-server local 192.168.1.93 ##ip of server port 1194 proto tcp dev tap0 up "/etc/openvpn/up.sh br0" down "/etc/openvpn/down.sh br0" persist-key persist-tun ca ca.crt cert server.crt key server.key dh dh1024.pem #tls-auth ta.key 0 cipher BF-CBC comp-lzo ifconfig-pool-persist ipp.txt server-bridge 192.168.1.93 255.255.255.0 192.168.1.110 192.168.1.120 push "dhcp-option DNS 192.168.1.1" push "dhcp-option DOMAIN nyc.rr.com" max-clients 10 user nobody group nogroup keepalive 10 120 status openvpn-status.log verb 3
And here's the
#!/bin/sh BR=$1 DEV=$2 MTU=$3 /sbin/ifconfig $DEV mtu $MTU promisc up /usr/sbin/brctl addif $BR $DEV
brctl works fine outside of this script. I'm able to execute it manually.
I start OpenVPN as root, so I don't think permissions in the issue, so that's why I'm so confused.
Thanks for any help.
EDIT: Here's the error that's echoed:
[root@server openvpn]# /etc/init.d/openvpn start
Starting openvpn: /etc/openvpn/up.sh: line 7: /usr/sbin/brctl: Permission denied