Set UFW before.rules without restart of server
- by enedene
I use UFW on my Ubuntu server. Unfortunately there are no rules in UFW to port forward to another machine.
What you need to do is edit /etc/before.rules and put routing commands there, for example
# nat Table rules
*nat
:POSTROUTING ACCEPT [0:0]
# Forward traffic from eth0 through eth1.
-A POSTROUTING -s 192.168.0.0/24 -o eth1 -j MASQUERADE
-A…