mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-01 21:12:12 +08:00
1aacd4b52e
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1047 af4574ff-66df-0310-9fd7-8a98e5e911e0
28 lines
763 B
XML
28 lines
763 B
XML
<sect3 id="postlfs-security-fw-stop" xreflabel="/etc/rc.d/init.d/firewall.stop">
|
|
<title>firewall.stop</title>
|
|
|
|
<para>If you need to turn firewalling off, this script will do it:</para>
|
|
|
|
<screen><userinput><command>cat > /etc/rc.d/init.d/firewall.stop << "EOF"</command>
|
|
#!/bin/sh
|
|
|
|
# Being $rc_base/init.d/firewall.stop
|
|
|
|
# deactivate IP-Forwarding
|
|
echo 0 > /proc/sys/net/ipv4/ip_forward
|
|
|
|
iptables -Z
|
|
iptables -F
|
|
iptables -t nat -F PREROUTING
|
|
iptables -t nat -F OUTPUT
|
|
iptables -t nat -F POSTROUTING
|
|
iptables -t mangle -F PREROUTING
|
|
iptables -t mangle -F OUTPUT
|
|
iptables -X
|
|
iptables -P INPUT ACCEPT
|
|
iptables -P FORWARD ACCEPT
|
|
iptables -P OUTPUT ACCEPT
|
|
<command>EOF</command></userinput></screen>
|
|
|
|
</sect3>
|