mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-19 12:55:35 +08:00
28 lines
761 B
XML
28 lines
761 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>
|
||
|
|
||
|
<para><screen><userinput>cat > /etc/rc.d/init.d/firewall.stop << "EOF"</userinput>
|
||
|
#!/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
|
||
|
<userinput>EOF</userinput></screen></para>
|
||
|
|
||
|
</sect3>
|