I have a OpenVPN server that is currently configured as a TAP device, with the intention of playing LAN games with my friends. Currently it is not bridging any broadcast packets (layer 2), but works otherwise. This is the topology:
Code: Select all
Remote Client <--> Web <-----> Router <-----> Local Client
(W/OpenVPN) <- TAP -> (OpenVPN Server) (W/O OpenVPN)
192.168.2.50-99 192.168.2.1 192.168.2.100-255
Here is my server config:
Code: Select all
mode server
proto udp
port 1194
dev tap0
daemon
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
duplicate-cn
keepalive 10 120
client-to-client
verb 6
management localhost 5001
server-bridge 192.168.2.1 255.255.255.0 192.168.2.50 192.168.2.99
ifconfig 192.168.2.1 255.255.255.0
push "dhcp-option DNS 192.168.2.1"
push "route-gateway 192.168.2.1"
push "route 192.168.2.0 255.255.255.0 192.168.2.1"
Code: Select all
client
dev tap0
remote [my ip] 1194
nobind
persist-key
persist-tun
ca "C:\\Program Files (x86)\\OpenVPN\\config\\key\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\config\\key\\client1.crt"
key "C:\\Program Files (x86)\\OpenVPN\\config\\key\\client1.key"
cipher BF-CBC
verb 5
float
dev-node "Local Area Connection 2"
Code: Select all
openvpn --mktun --dev tap0
brctl addif br0 tap0
ifconfig tap0 0.0.0.0 promisc up
iptables -I INPUT -p udp --dport 1194 -j ACCEPT
Code: Select all
10.36.36.1 255.255.255.255 0.0.0.0 ppp0
192.168.2.0 255.255.255.0 0.0.0.0 LAN & WLAN
192.168.2.0 255.255.255.0 0.0.0.0 tap0
169.254.0.0 255.255.0.0 0.0.0.0 LAN & WLAN
0.0.0.0 0.0.0.0 10.36.36.1 ppp0
HoboSteaux