How to list all firewall rules

Issues related to configuring your network
Post Reply
ddolecki108
Posts: 39
Joined: 2017/02/28 20:46:44

How to list all firewall rules

Post by ddolecki108 » 2017/04/21 19:46:35

We have some legacy CentOS5.x systems that we are migrating to 7, how do I list all the firewall rules that are in place so that I can apply them once we move them to CentOS7?

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: How to list all firewall rules

Post by scottro » 2017/04/21 21:13:04

You should be able to do less /etc/sysconfig/iptables to get a listing of the rules. There's also iptables -L -n (to show addresses numerically--without -n it tries to look up the names of the addresses
New users should check the FAQ and Read Me First pages

Post Reply