Linux – howto check iptables status with normal user

iptableslinuxmonitoringredhat

How could check if iptables is running ok in a machine ,using a restricted permission user ?

i need to monitor this…

BR
Thanks for the great Site !!!

Best Answer

iptables needs to be run as root. You can solve this by using sudo and restricting a particular user to a particular command line. Run visudo and add the following line

restricteduser    ALL = NOPASSWD: /sbin/iptables

and now your restricted user can run:

$ sudo /sbin/iptables -L -v

They will be able to modify your firewall configuration if you enable them to run iptables.