0

I am trying to bind an openvpn client's connection to an Ethernet port(eth1) in order to route an entire network through it.

I have already configured the OpenVPN server and tested it on a Windows client.

Server

The server is connected to the internet with interface "ens3" and "tun0" for the vpn. IP forwarding is enabled.

OpenVPN config

dev tun
ifconfig 10.8.0.1 10.8.0.2
secret /etc/openvpn/static.key
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
cipher AES-128-CBC

Client

The client will be running Raspbian Stretch Lite (Debian based). It has two Ethernet port eth0 and eth1. eth0 is connected to the internet with a static IP. I wish to route all of the openvpn traffic through eth1. A wireless router will plugged into eth1.

Client Config

remote XXX.XXX.XXX.XXX
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret /etc/openvpn/static.key
redirect-gateway def1 bypass-dhcp
dhcp-option DNS 1.1.1.1
dhcp-option DNS 1.0.0.1
cipher AES-128-CBC

How do I route the traffic to eth1?

  • Sorry, I don't understand what you're actually trying to achieve. You wish all traffic hitting the wireless router on a private network to be tunneled out through openvpn to the server over the interwebs? – tink Feb 24 at 16:59
  • Yeah I am trying to route traffic from that Wireless router to go through the the openvpn server. Server-INTERNET-Client(gateway/bridge)- Wireless router – Reseau DuPont Feb 24 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.