firewall-masq
来自「基于嵌入式linux和s3c2440的gprs拨号脚本程序」· 代码 · 共 37 行
TXT
37 行
#!/bin/sh## firewall-masq This script sets up firewall rules for a machine# acting as a masquerading gateway## Copyright (C) 2000 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+ANY=0.0.0.0/0ipchains -P input ACCEPTipchains -P output ACCEPTipchains -P forward DENYipchains -F forwardipchains -F inputipchains -F output# Deny TCP and UDP packets to privileged portsipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p udp -j DENYipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p tcp -j DENY# Deny TCP connection attemptsipchains -A input -l -i $EXTIF -p tcp -y -j DENY# Deny ICMP echo-requestsipchains -A input -l -i $EXTIF -s $ANY echo-request -p icmp -j DENY# Do masqueradingipchains -A forward -j MASQecho 1 > /proc/sys/net/ipv4/ip_forward
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?