Quantcast
Channel: Active questions tagged openvpn - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 823

Passthrough of OpenVPN clients to local network

$
0
0

Ahoy friends. Unfortunately i don't have that much knowledge about OpenVPN but at least i want to try to get my idea working. Currently i'm using a VoIP device connected to my local area network, and it receives an IP by the network's dhcp server. Now i will stay for some time in Ecuador, and i got an OpenWRT device, using it as OpenVPN client to connect to my OpenVPN server inside of the local area network here at home. So i want to bridge the VoIP device, connected to the OpenWRT device, configured as bridge as well, into my local area network, to use it, having the same phone number like in my current country.

I used this script to configure my OpenVPN server automatically, because it seems to be quite complicated.

https://github.com/angristan/openvpn-install

But this script only provides NAT mode, using the tun device. Is there a easy way to get it working using tap, or bridge mode, to let the clients obtain an ip address by the local network's dhcp?

There is my current /etc/openvpn/openvpn.conf

port 1194
proto udp6
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
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 bypass-dhcp"
server-ipv6 fd42:42:42:42::/112
tun-ipv6
push tun-ipv6
push "route-ipv6 2000::/3"
push "redirect-gateway ipv6"
compress lz4-v2
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key 0
crl-verify crl.pem
ca ca.crt
cert server_SvMuc9xhzr1ktbQ9.crt
key server_SvMuc9xhzr1ktbQ9.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

iptable rules

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i enp1s0 -p udp -m udp --dport 1194 -j ACCEPT
-A INPUT -i tun0 -j ACCEPT
-A FORWARD -i tun0 -o enp1s0 -j ACCEPT
-A FORWARD -i enp1s0 -o tun0 -j ACCEPT

I hope someone can help me in order to get it working! Thanks in advance.


Viewing all articles
Browse latest Browse all 823

Trending Articles