Configuration of the “/etc/rc.d/init.d/firewall” script file for the Gateway Server | All about OS

Configuration of the “/etc/rc.d/init.d/firewall” script file for the Gateway Server

Категория: Securing and Optimizing

echo -n “Shutting Firewalling Services:”
# Remove all existing rules belonging to this filter
ipchains -F
# Delete all user-defined chain to this filter
ipchains -X
# Reset the default policy of the filter to accept,
ipchains -P input ACCEPT
ipchains -P output ACCEPT ipchains -P forward ACCEPT
status)
status firewall
restart|reload) $0 stop $0 start
echo “Usage: firewall {start|stop|status|restart|reload}” exit 1 esac
exitO
Now, make this script executable and change its default permissions: [root@deep /]# chmod 700 /etc/rc.d/init.d/firewall [root@deep /]# chown 0.0 /etc/rc.d/init.d/firewall
Create the symbolic red links for your Firewall with the command: [root@deep /]# chkeonfig -add firewall [root@deep /]# chkeonfig -level 345 firewall on
Now, your firewall rules are configured to use System V init (System V init is in charge of starting all the normal processes that need to run at boot time) and it will be automatically started each time your server reboots.
• To manually stop the firewall on your system, use the following command:
[root@deep /]# /etc/rc.d/init.d/firewall stop
Shutting Firewalling Services: [ OK ]
• To manually start the firewall on your system, use the following command:
[root@deep /]# /etc/rc.d/init.d/firewall start
Starting Firewalling Services: [ OK ]

Страниц: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

« Build a kernel with Firewall Masquerading and Forwarding support
Deny access to some address »