![]() Next, I created the following file at /root/myfirewall: #!/bin/bash Those two steps should have the effect of undo-ing my firewall rules every 15 minutes, in case I screw them up. Next, I added this entry to the root user crontab, using the crontab -e command: # undo the iptables stuff in case i mess it up Mv /etc/sysconfig/iptables /tmp > $OUT 2>&1 As a quick note to self, here’s how I configured the firewall rules on a new CentOS 6 Linux server recently.įirst, I created an “undo” script at /root/undo-iptables with these contents: #!/bin/sh
0 Comments
Leave a Reply. |