Hi,
I would like a working bridge to bridge over vpn. I'll detail why I need this at end of post.
Setup:
Server: Windows on 172.10.0.132/24.
Openvpn 2.3.11 (openvpn-install-2.3.11-I601-i686)
Bridged ethernet to tap connection MyTap - bridged connection set to 172.10.0.132/24 with gateway to internet
Server.ovpn:
port 1194
proto udp
dev tap
dev-node MyTap
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
key "C:\\Program Files\\OpenVPN\\config\\server.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh1024.pem"
topology subnet
ifconfig-pool-persist ipp.txt
server-bridge 172.10.0.133 255.255.255.0 172.10.0.5 172.10.0.15
client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
Client: raspberry pi3 with locally compiled openvpn 2.3.11 (the 2.3.4 version came on the jesse image I have so I downloaded 2.3.11)
Client bridge script:
#!/bin/sh
br="br0"
tap="tap0"
eth="eth0"
eth_ip="172.10.0.5"
eth_netmask="255.255.255.0"
eth_broadcast="172.10.0.255"
eth_gateway="172.10.0.1"
case "$1" in
start)
for t in $tap; do
openvpn --mktun --dev $t
done
brctl addbr $br
brctl addif $br $eth
for t in $tap; do
brctl addif $br $t
done
for t in $tap; do
ifconfig $t 0.0.0.0 promisc up
done
ifconfig $eth 0.0.0.0 promisc up
ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast
;;
stop)
ifconfig $br down
brctl delbr $br
for t in $tap; do
openvpn --rmtun --dev $t
done
;;
*)
echo "Usage: openvpn-bridge {start|stop}"
exit 1
;;
esac
exit 0
client.conf
client
dev tap0
proto udp
remote a.b.c.d 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/rpi.crt
key /etc/openvpn/rpi.key
comp-lzo
verb 3
After I bring up the connection, I can ping the server from the client for a while, but then it stops:
64 bytes from 172.10.0.132: icmp_seq=111 ttl=128 time=10.4 ms
64 bytes from 172.10.0.132: icmp_seq=112 ttl=128 time=8.53 ms
64 bytes from 172.10.0.132: icmp_seq=113 ttl=128 time=309 ms
64 bytes from 172.10.0.132: icmp_seq=114 ttl=128 time=8.64 ms
64 bytes from 172.10.0.132: icmp_seq=115 ttl=128 time=11.2 ms
From 172.10.0.5 icmp_seq=116 Destination Host Unreachable
From 172.10.0.5 icmp_seq=117 Destination Host Unreachable
From 172.10.0.5 icmp_seq=118 Destination Host Unreachable
From 172.10.0.5 icmp_seq=119 Destination Host Unreachable
From the server, I could also ping a computer out on the client eth0 network (172.10.0.10)
What steps can I take to diagnose problem?
This may be a red herring but this is in the server log:
Sun Jun 26 10:29:11 2016 rpi/192.168.1.120:46600 MULTI: Learn: d2:6a:13:69:0f:5f
-> rpi/192.168.1.120:46600
Sun Jun 26 10:29:12 2016 rpi/192.168.1.120:46600 MULTI: Learn: b8:27:eb:88:7f:0b
-> rpi/192.168.1.120:46600
Sun Jun 26 10:29:55 2016 rpi/192.168.1.120:46600 MULTI: Learn: 00:23:18:6c:ee:8f
-> rpi/192.168.1.120:46600
So it seams that I was pinging fine until the last Multi: Learn event - which that MacID is actaully my computer on the client network (172.10.0.10)
Thanks for any insight.