Basic Commands for Services Print

  • 5

IPTABLES

To check firewall rule set using iptables:
iptables -L

To Flush/Clear the firewall rules:
iptables -F

Restarting the iptables service will flush the all the defined chain which is not loaded into kernel. Restart the iptables service using following command.

/etc/rc.d/init.d/iptables restart or
service iptables restart.

Usage: /etc/rc.d/init.d/iptables {start|stop|restart|condrestart|status|panic|save}

E-MAIL

How to test the mail account for the user created on mail server:
sendmail -bv user-name@domain-name

How to restart sendmail service:
/etc/rc.d/init.d/sendmail restart

Usage: /etc/rc.d/init.d/sendmail {start|stop|restart|condrestart|status}

RESTARTING FAILED SERVICES

How to restart exim service:
service exim restart

How to restart psa service:
service psa restart

How to restart Apache:
/etc/rc.d/init.d/httpd restart
or
service httpd restart

Usage: httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}


Was this answer helpful?

« Back