[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[plamo:09687] Re: masquerading
-
From:早間義博
-
Date:Wed, 2 May 2001 11:22:28 +0900
- Subject: [plamo:09687] Re: masquerading
- From: 早間義博<yossi@xxxxxxxxxxxxxx>
- Date: Wed, 2 May 2001 11:22:28 +0900
- Posted: Wed, 02 May 2001 11:21:23 +0900 (JST)
早間です。
> ただ、IP MASQUERADEに問題があるようです。
>
原因は不明ですが、ADSLでは私だけで無いようです。
比較は出来ませんが、 OCN エコノミー で ipchains でのmasquerade
では問題を発生出来ません。
Linux router の強みで、apache をproxy サーバとして起動しました。
proxy サーバを通せば問題は解消できます。
iptables での設定は以下のとおりです。
#
# filter
#
iptables -t filter -N Ppp-in
iptables -t filter -N eth-in
iptables -t filter -N icmp-acc
iptables -t filter -A INPUT -i ppp0 -j Ppp-in
iptables -t filter -A INPUT -i lo -j ACCEPT
iptables -t filter -A INPUT -i eth1 -j eth-in
iptables -t filter -P INPUT DROP
#
# icmp
#
iptables -t filter -A icmp-acc -p icmp --icmp-type echo-reply -j ACCEPT
iptables -t filter -A icmp-acc -p icmp --icmp-type destination-unreachable -j ACCEPT
iptables -t filter -A icmp-acc -p icmp --icmp-type source-quench -j ACCEPT
iptables -t filter -A icmp-acc -p icmp --icmp-type time-exceeded -j ACCEPT
iptables -t filter -A icmp-acc -p icmp --icmp-type parameter-problem -j ACCEPT
#
# Ppp-in
#
iptables -t filter -A Ppp-in -s 192.168.0.0/16 -j DROP
iptables -t filter -A Ppp-in -s 172.16.0.0/12 -j DROP
iptables -t filter -A Ppp-in -s 10.0.0.0/8 -j DROP
iptables -A Ppp-in -p icmp -j icmp-acc
iptables -t filter -A Ppp-in -p udp --source-port domain -j ACCEPT
iptables -t filter -A Ppp-in -p TCP ! --syn -j ACCEPT
iptables -t filter -A Ppp-in -p TCP --source-port ftp-data --destination-port 1024:5999 -j ACCEPT
iptables -t filter -A Ppp-in -p TCP --source-port ftp-data --destination-port 6010 -j ACCEPT
#
# eth-in
#
iptables -t filter -A eth-in -j ACCEPT
#
# Masquerading
#
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
/bin/echo 1 > /proc/sys/net/ipv4/ip_forward
- Follow-Ups
-
- [plamo:09719] Re: masquerading, 早間義博
[検索ページ]
[メール一覧]
Plamo ML 公開システム