Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh -e
- ### BEGIN INIT INFO
- # Provides: firewall-stop
- # Required-Start: $network $remote_fs $syslog
- # Required-Stop: $network $remote_fs $syslog
- # Should-Start: network-manager
- # Should-Stop: network-manager
- # X-Start-Before: $x-display-manager gdm kdm xdm wdm ldm sdm nodm
- # X-Interactive: true
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Firewall service by Olivier
- # Description: This script will stop the firewall rules
- ### END INIT INFO
- echo -n "Stopping firewall.... "
- PATH=/sbin:/bin:/usr/sbin:/usr/bin
- ################################################################################
- # Ou trouver iptables
- IPTABLES="/sbin/iptables"
- ################################################################################
- # 2. Module loading.
- ################################################################################
- /sbin/depmod -a
- /sbin/modprobe ip_tables
- /sbin/modprobe ip_conntrack
- /sbin/modprobe iptable_filter
- /sbin/modprobe iptable_mangle
- /sbin/modprobe iptable_nat
- /sbin/modprobe ipt_LOG
- /sbin/modprobe ipt_limit
- /sbin/modprobe ipt_state
- ################################################################################
- # 3. /proc set up.
- ################################################################################
- echo "0" > /proc/sys/net/ipv4/ip_forward
- echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter
- #
- # on remet tout à zéro
- $IPTABLES --flush
- $IPTABLES --delete-chain
- $IPTABLES --table nat --flush
- ########################################################################
- $IPTABLES -P INPUT ACCEPT
- $IPTABLES -P OUTPUT ACCEPT
- $IPTABLES -P FORWARD ACCEPT
- #
- echo "....stopped"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement