Ahoy friends.
Unfortunately i don't have much experience about this network stuff, but i want to give a try at least.
I got a virtual machine running on my server, providing an OpenVPN server.
The way to setup OpenVPN seems to be quite complicated, so i used this script
https://github.com/angristan/openvpn-install and it has worked really fine, but only providing NAT, but in my case i need a bridge.
I got an OpenWRT router, and i'll stay for some time in another country.
On my Android phone i got an OpenVPN client installed, and it's running fine.
So i want to connect my phone to my local area network as OpenVPN client. Furthermore i want to connected the OpenWRT router to my phone, acting as LAN/WIFI bridge for the connected lan devices.
I want to connect a VoIP telephone, to be able to use it like in the network itself. So i have to bridge it in order to use the same phone number provided by the network etc.
But how can i get it work? I used the openvpn-install script to get it running in NAT mode, and followed this guide here to get it running in bridged mode.
https://openvpn.net/community-resources/ethernet-bridging/
It seems to work at least a little bit. But not as expected. I would like to let the VPN clients obtain an ip address from the local networks dhcp server.
Here i got my server.conf
port 1194
proto udp
dev tap
user nobody
group nogroup
persist-key
keepalive 10 120
topology subnet
server-bridge 192.168.2.1 255.255.255.0 192.168.2.128 192.168.2.254
ifconfig-pool-persist ipp.txt
;push "dhcp-option DNS 1.0.0.1"
;push "dhcp-option DNS 1.1.1.1"
push "redirect-gateway def1"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key 0
crl-verify crl.pem
ca ca.crt
cert server_1nuWH2G8pXZSUkhp.crt
key server_1nuWH2G8pXZSUkhp.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
status /var/log/openvpn/status.log
verb 3
My client.conf
client
proto udp
remote 192.168.2.25 1194
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_1nuWH2G8pXZSUkhp name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
verb 3
My iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i enp0s3 -p udp -m udp --dport 1194 -j ACCEPT
-A INPUT -i tun0 -j ACCEPT
-A INPUT -i tap0 -j ACCEPT
-A INPUT -i br0 -j ACCEPT
-A FORWARD -i tun0 -o enp0s3 -j ACCEPT
-A FORWARD -i enp0s3 -o tun0 -j ACCEPT
-A FORWARD -i br0 -j ACCEPT