In the case of no OpenVPN profile, you could try using ufw to only allow outbound connections on that interface to port 1194 (or whatever port the OpenVPN server is accepting connections on.) Something like: sudo ufw deny out to any sudo ufw allow out 1194/udp (assuming a stock OpenVPN setup.)

Feb 15, 2019 · sudo ufw deny from 23.24.25.0/24 to any port 80sudo ufw deny from 23.24.25.0/24 to any port 443. Writing deny rules is the same as writing allow rules, you only need to replace allow with deny. Delete UFW Rules # There are two different ways to delete UFW rules, by rule number and by specifying the actual rule. Uncomplicated Firewall (ufw) — The Uncomplicated Firewall (ufw, and gufw - a Graphical User Interface version of the same) is a frontend for iptables and is particularly well-suited for host-based firewalls. Ufw provides a framework for managing netfilter, as well as a command-line interface for manipulating the firewall. Any internet requests originating from the OpenVPN client on my phone were met with timeouts. I once again ran "sudo ufw reload" directly on my Pi device over SSH, and after reloading UFW I have no issues with internet connectivity on the client device. I'm able to connect to all websites perfectly fine after the UFW reload on the Pi. Aug 23, 2016 · ufw rules also need to be changed to allow masquerading, so add this at the start, before *filter section. sudo nano /etc/ufw/before.rules # START OPENVPN RULES # NAT table rules *nat:POSTROUTING ACCEPT [0:0] # Allow traffic from OpenVPN client to eth0-A POSTROUTING -s 10.8.0.0/8 -o eth0-j MASQUERADE COMMIT # END OPENVPN RULES

Feb 15, 2019 · sudo ufw deny from 23.24.25.0/24 to any port 80sudo ufw deny from 23.24.25.0/24 to any port 443. Writing deny rules is the same as writing allow rules, you only need to replace allow with deny. Delete UFW Rules # There are two different ways to delete UFW rules, by rule number and by specifying the actual rule.

Feb 15, 2019

openvpn - Pastebin.com #How to configure and use the ufw firewall rules for the OpenVPN server. #Type the following ufw command to open port 1194 and 22 (ssh) sudo ufw allow 1194/udp. sudo ufw allow 22/tcp . #Edit the file /etc/ufw/before.rules, enter: sudo nano /etc/ufw/before.rules . #add at top: # START OPENVPN … How to Set Up IPsec-based VPN with Strongswan on Debian