You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

sudo su -


grep DEFAULT_FORWARD_POLICY /etc/default/ufw
sed -i 's/DEFAULT_FORWARD_POLICY="DROP"/DEFAULT_FORWARD_POLICY="ACCEPT"/' /etc/default/ufw
grep DEFAULT_FORWARD_POLICY /etc/default/ufw

grep 'net.ipv4.ip_forward=1' /etc/sysctl.conf
sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf
grep 'net.ipv4.ip_forward=1' /etc/sysctl.conf
vi /etc/ufw/before.rules 
*nat
:POSTROUTING ACCEPT [0:0]
# Allow traffic from OpenVPN client to eth0 (change to the interface you discovered!)
-A POSTROUTING -s 10.0.0.0/24 -o enp2s0 -j MASQUERADE
COMMIT
ufw allow 22/tcp
ufw disable; ufw enable


  • No labels