banner
libxcnya.so

libxcnya.so

Nothing...
telegram
twitter
github
email

Delete all ufw chains in Ubuntu iptables

Usually, we directly uninstall ufw with apt, but there are still a bunch of ufw chains left in iptables.

1

Affects the aesthetics.
Only the following 4 commands are needed to delete all ufw chains:

for i in `iptables -L INPUT --line-numbers |grep '[0-9].*ufw' | cut -f 1 -d ' ' | sort -r `; do iptables -D INPUT $i ; done

for i in `iptables -L FORWARD --line-numbers |grep '[0-9].*ufw' | cut -f 1 -d ' ' | sort -r `; do iptables -D FORWARD $i ; done

for i in `iptables -L OUTPUT --line-numbers |grep '[0-9].*ufw' | cut -f 1 -d ' ' | sort -r `; do iptables -D OUTPUT $i ; done

for i in `iptables -L | grep 'Chain .*ufw' | cut -d ' ' -f 2`; do iptables -X $i ; done

iptables-save

2

Feels much better.

This article is synchronized and updated to xLog by Mix Space.
The original link is https://blog.nekorua.com/posts/maintain/49.html


Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.