Hey,
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:
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
My setup has it set so all members of my local network do not have to have OpenVPN installed, with my router having the OpenVPN server residing on it (dd-wrt). Both the LAN and TAP have the same subnetmask of 255.255.255.0
Here is my server config:
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"
And the client config:
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"
My startup and firewall:
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
My routing table:
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
I really appreciate and direction which you can offer me, I am still fairly new to networking and will research any topic if I know what I am looking for.
HoboSteaux