iptables 堦敪儊儌

嶳怷峗岾

h-yamamo@db3.so-net.ne.jp

v0.1, 24 April 2002

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

僷働僢僩僼傿儖僞儕儞僌偲偐 NAT 偲偐偺暥彂怓乆偁傞偗偳丄偦傫側偺柺搢偔偝
偔偰撉傫偱傜傟傞偐偀!! 偲偄偆*偁側偨*偵亀iptables 堦敪儊儌亁傪偍憽傝偟
傑偡丅偱偼偝偭偦偔丄

# 儅僗僇儗乕僪

iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o ppp0 -j MASQUERADE 

# 僼傿儖僞儕儞僌

iptables -A INPUT -i ppp0 -m state --state NEW,INVALID -j DROP         
iptables -A FORWARD -i ppp0 -m state --state NEW,INVALID -j DROP       

# 僷僗 MTU 栤戣夞旔 (*1)

iptables -A FORWARD -o ppp0 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

偙傟偼 ADSL 愙懕偟偨 Linux 2.4 偺僼傽僀傾僂僅乕儖丒儖乕僞偺昁恵愝掕僨乣
僗!?

偁偲偼偁側偨偺僙儞僗偱傾儗儞僕偡傞偺傕儓僔丅

僨傿僗僩儕價儏乕僔儑儞偵傛偭偰愝掕曽朄(愝掕僼傽僀儖摍)偼怓乆偱偟傚偆偗
偳丄梫偼 ppp0 偑 UP 偡傞慜偵丄偙傟傜偺儖乕儖偑愝掕偝傟偰偄傞偙偲偱偡丅

傕偟丄徻偟偄偙偲偑抦傝偨偔側偭偨傜 JF 偺僪僉儏儊儞僩撉傫偱偔偩偝偄偹 :)

丒Linux 2.4 NAT HOWTO (徻嵶愢柧売強 )              
丒Linux 2.4 Packet Filtering HOWTO (徻嵶愢柧売強 ) 
丒netfilter/iptables FAQ                           
丒Linux IP Masquerade HOWTO                        
丒僱僢僩儚乕僋慡暥彂                               

(*1)                                                                   
丒@IT幮偺婰帠                                                          
丒Netfilter Extensions HOWTO (徻嵶愢柧売強 ) # 傑偩擔杮岅栿偑偁傝傑偣傫
丅*偁側偨*偑東栿偟偰傒傑偣傫偐!!                                       

