I have a CentOS 7 system, with a VPN host and one physical network interface.
I have my physical network interface assigned to
public zone, while my VPN requests are going through
trusted. Also, I have some servers, in docker containers routed to the latter zone.
I'd like, if my VPN and Docker containers to have internet connection, while retaining the subnet of
10.8.0.0/24 that I created on zone
The solution I'm thinking of involves forwarding request from
10.8.0.0/24 to out of the subnet to the physical interface, preferably with masquareding. If you have a better solution, I'm open to it.
So far, my
firewalld config looks like this.
public (active) target: default icmp-block-inversion: no interfaces: enp2s0 sources: services: ssh dhcpv6-client ports: 8080/tcp 23/tcp 1194/udp 80/tcp 443/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: trusted (active) target: ACCEPT icmp-block-inversion: no interfaces: docker0 sources: 10.8.0.0/24 2001:0db8:ee00:abcd::/64 services: openvpn ports: protocols: masquerade: yes forward-ports: source-ports: icmp-blocks: rich rules: