Question : iptables

if i run the following command
iptables -A input ....
why isnt it appearing in the etc/sysconfig/iptables
nor on iptables -L
even after restarting iptables
and
whats the difference between
rh-firewall-1-input iptables
iptables -A input

Answer : iptables

The command:
iptables -A INPUT ....
adds a rule in the current ruleset and is visible in:
iptables -L

However it is not added automatically to etc/sysconfig/iptables and it is not persistent over reboots (restarts of iptables)

Edit the file etc/sysconfig/iptables directly and restart iptables or add the rule with "iptables -A INPUT ...." and save the rules to etc/sysconfig/iptables with "iptables-save"

INPUT is the linux built in chain for packets arriving to the machine.
rh-firewall-1-input iptables is a custom chain created by RedHat linux distributions and this chain usually receives redirects from built in INPUT and FORWARD chains.
Random Solutions  
 
programming4us programming4us