3

On Ubuntu server 14.04, I enabled ufw port forwarding from 80 to 8181 (tcp) by using the checked answer on Can I use ufw to setup a port forward?

Finally I'd rather proxy http request using apache2 proxy capabilities. So I removed the added lines to /etc/ufw/before.rules, then disabled/reenabled ufw.

And the port forwarding is still active. Any idea ?

Thanks in advance.

EDIT

A simple reboot is enough. My guess is that it cleared iptables. So my question is now : how could I have this done without rebooting ?

1 Answers1

3

By flushing the chains in the NAT table and removing any sub-chains:

ufw disable
iptables  --table nat  --flush
iptables  --table nat  --delete-chain
ufw enable

Short options: --table|-t, --delete-chain|-X

Nils Toedtmann
  • 3,202
  • 5
  • 25
  • 36