And in addition to what's been said already:
Quote:
Originally Posted by shukalo83
When I log in redhat4 box iptables -vL give me about 20 to 30 lines of output.
|
That's because you should run '/etc(/rc.d)/init.d/iptables status' or 'service iptables status' or something distro-agnostic like 'cat /proc/net/ip_tables_names | xargs -iT /sbin/iptables -t 'T' -xvnL'.
Quote:
Originally Posted by shukalo83
Somebody else before me administered the box. Is there a way for me to know what startup script he used to run the iptables on startup. He certainly didn't use iptables-save/restore.
|
While iptables rules may be loaded in different ways (rc.local, cron @reboot, you name it) by default iptables should be a service in etc/rc.d/init.d/ so best just first check what 'rpm -q iptables' (is it installed?), 'rpm -Vv iptables' (have package contents been modified?) and 'chkconfig --list iptables' (is the service enabled?) return before grepping recursively through the /etc/init.d directory for clues.
Quote:
Originally Posted by shukalo83
Is there a way to run services one by one (..) in /etc/rc.S file and checking consequences of each service or startup script?
|
The /etc/rc.d/rc.S equivalent would be /etc/rc.d/rc.local IIRC but wrt standards compliance and management-wise services are best started by using existing service files (networking, SSH) or creating one.