OAS = OpenVPN Access Server
UFW = Uncomplicated FireWall
I am using UFW and just realized that I can access OAS admin GUI from everywhere. This puzzled me because I added a rule in UFW to make sure that port 943 is only accessible from the local network.
Just like you, I have realized that OAS is tampering with iptables, and these rules are overriding my UFW rules.
And if you think it helps changing the ports in Admin Web GUI, you will notice that OAS will also add these new ports to iptables, leaving them open to the outside world.
My purpose is the following:
- Do not reveal Web GUI to the world at the servers public ip or the domain.
- Be able to access Web GUI through domain name via VPN or my home ip
I am not familiar with iptables, so messing with the config is not an option.
Reading this faq didn't make it clear how to accomplish what I want:
How do I prevent Access Server from modifying iptables rules on my Linux host?
What I ended up doing:
- Change the listening interface of the Web GUI to the local network. This prevents the ports from being open to the public and respond to the public IP in the browser.
- Set up a proxy in Apache to the local address on port 943 and add Require IP to restrict access. That way I can access the admin via vpn.domain.com even though the service is only listening on the local network interface, and restrict access the way I want.
- Removed all rules in UFW related to OAS, since they have no effect