Linux Bridge through openvpn client

How to customize and extend your OpenVPN installation.
Post Reply
TomB
OpenVpn Newbie
Posts: 1
Joined: Sat Nov 10, 2018 2:24 pm

Linux Bridge through openvpn client

Post by TomB » Sat Nov 10, 2018 2:33 pm

I have a PC acting as a network bridge. The basic setups is Computer 1 -> Computer 2 -> Router -> internet

Code: Select all

ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bridge0 state UP group default qlen 1000
    link/ether 00:e0:4c:68:31:a8 brd ff:ff:ff:ff:ff:ff
3: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bridge0 state UP group default qlen 1000
    link/ether 00:e0:4c:68:31:a9 brd ff:ff:ff:ff:ff:ff
7: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:e0:4c:68:31:a8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.129/24 brd 192.168.1.255 scope global noprefixroute dynamic bridge0
       valid_lft 85711sec preferred_lft 85711sec
    inet6 fe80::89ab:e214:38f5:abc5/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
8: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
    link/none 
    inet 10.8.8.25/24 brd 10.8.8.255 scope global tun0
       valid_lft forever preferred_lft forever
    inet6 fe80::f5f4:d245:5d0:20b9/64 scope link flags 800 
       valid_lft forever preferred_lft forever

I have an openvpn client on running on Computer 2 and want to have all of Computer 1's traffic also go through the VPN.

Currently: All of Computer 2's (where OpenVPN is running) traffic is sent through the VPN as I intend, however Computer 1's traffic goes through the network bridge without using the VPN. How can I configure the bridge to include the VPN? Computer 1 -> Computer 2 -> VPN client running on Computer 2 -> Router-> Internet.

Thanks for any help/advice. Computer 2 is running Centos 7 if distro makes any difference.

Post Reply