I have an Ubuntu server 14.04 machine that serves as a NAT router.
The routing is achieved using Shorewall, mostly in line with this tutorial.
The LAN has the subnet
On this machine I also want to run an OpenVPN server, which listens on port 1194 (udp).
Clients connecting to this VPN (from the internet) should find themselves in the
Hosts in the VPN subnet should be able to reach hosts in the LAN subnet, with both udp and tcp connections.
Also, hosts in the VPN subnet should be able to access the internet through my server (masqueraded).
My question is: How do I configure Shorewall to make this happen?
a) Connecing VPN clients should get an answer from the OpenVPN server
b) Hosts in the VPN subnet should be able to access the internet
/etc/shorewall/rules contains a line that opens the OpenVPN server's port for incoming VPN connections
#ACTION SOURCE DEST PROTO DEST SOURCE # PORT PORT(S) # listen for VPN on net ACCEPT net $FW udp 1194
I have tried using a
/etc/shorewall/tunnels file, like this page suggests, but to no avail.
I also tried translating the
/etc/shorewall/tunnels file into
/etc/shorewall/rules, as per this page, but this was also unsuccessful. All I ever get is a timeout while setting up the connection.
Some more shorewall config files of mine:
#ZONE INTERFACE BROADCAST OPTIONS net p10p1 detect #... loc eth1 detect #... vpn tun+
#ZONE TYPE OPTIONS IN OUT # OPTIONS OPTIONS fw firewall net ipv4 loc ipv4 vpn ipv4
#INTERFACE:DEST SOURCE ADDRESS PROTO PORT(S) IPSEC MARK USER/ SWITCH ORIGINAL # GROUP DEST p10p1 10.0.0.0/24