UFW help on multi-openvpnserver raspberrypi

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
blleh
OpenVpn Newbie
Posts: 1
Joined: Fri Mar 18, 2016 5:06 am

UFW help on multi-openvpnserver raspberrypi

Post by blleh » Fri Mar 25, 2016 2:42 pm

Hi guys. I'm setting up a Raspberry PI with multiple VPN servers.

I've got the first one running and the second ready to go online, but i'm stuck with the firewall rules. I am using UFW for this.

Openvpn suggests the lines below to open the connection.

Code: Select all

iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
How can i add these to UFW ?

Can this be combined with the rules for server 1 ?

Current setup:

192.168.8.1/252 Home Network
192.168.8.254 Router IP
192.168.8.17 Raspberry PI IP
10.8.1.0/8 PI Server 1 TUN secure web access/network hdd access
10.8.2.0/8 PI Server 2 TAP routed, nvidia gamestream/steam in-home streaming -- no internet to minimize data traffic

Current UFW additions:

/etc/default/ufw

Code: Select all

DEFAULT_FORWARD_POLICY="ACCEPT"
/etc/ufw/before.rules

Code: Select all

*nat
:POSTROUTING ACCEPT [0:0] 
-A POSTROUTING -s 10.8.1.0/8 -o eth0 -j MASQUERADE
COMMIT
opened the port for server 1

Code: Select all

ufw allow 63746/udp

Post Reply