firewall-standalone

来自「在linux上实现拨号上网的功能,可以在平台arm上运行,移植性比较好。最新的代」· 代码 · 共 35 行

TXT
35
字号
#!/bin/sh## firewall-standalone	This script sets up firewall rules for a standalone#                       machine## Copyright (C) 2005 Roaring Penguin Software Inc.  This software may# be distributed under the terms of the GNU General Public License, version# 2 or any later version.# LIC: GPL# Interface to InternetEXTIF=ppp+iptables -P INPUT ACCEPTiptables -P OUTPUT ACCEPTiptables -P FORWARD DROPiptables -F FORWARDiptables -F INPUTiptables -F OUTPUT# Deny TCP and UDP packets to privileged portsiptables -A INPUT -p udp -i $EXTIF --dport 0:1023 -j LOGiptables -A INPUT -p tcp -i $EXTIF --dport 0:1023 -j LOGiptables -A INPUT -p udp -i $EXTIF --dport 0:1023 -j DROPiptables -A INPUT -p tcp -i $EXTIF --dport 0:1023 -j DROP# Deny TCP connection attemptsiptables -A INPUT -i $EXTIF -p tcp --syn -j LOGiptables -A INPUT -i $EXTIF -p tcp --syn -j DROP# Deny ICMP echo-requestsiptables -A INPUT -i $EXTIF -p icmp --icmp-type echo-request -j DROP

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?