Hey guys, first time post, long time lurk. Thanks to the community for providing great info.
I'm attempting to have clients obtain DHCP information from the server's network's DHCP server automatically after initiating a connection. I'd also like the TAP to come up automatically.
So far I can only make DHCP and the tap interface come up automatically by manually running 'ifconfig tap0 up' and 'dhcp tap0'. If I specify an available range after the server-bridge variable in server.conf, the interface comes up automatically with an IP address, but I suspect it's because I'm avoiding the DHCP issue. Simply using 'server-bridge' in server.conf doesn't work as desired, and I need to run 'ifconfig tap0 up' and 'dhcp tap0' manually.
I really appreciate any tips you guys can offer on this!
Here's my server.conf:
root@host:~# grep -vE '^#|^;|^$' /etc/openvpn/server.conf
port 1194
proto udp
dev tap
up "/etc/openvpn/up.sh br0 eth0"
ca ca.crt
cert host.redacted.com.crt
key host.redacted.com.key
dh dh4096.pem
server-bridge #192.168.1.120 255.255.255.0 192.168.1.50 192.168.1.60
max-clients 10
client-to-client
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
verb 4
Here's a client.conf:
client
dev tap
proto udp
remote redacted.com 1194
resolv-retry infinite
nobind
user nobody
group nobody
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/
www.redacted.com.crt
key /etc/openvpn/
www.redacted.com.key
ns-cert-type server
comp-lzo
verb 3
Thank you!