- 392 名前:はまってます [2007/09/02(日) 18:31:00 ID:MBbpYlqy]
- ルーターAのiptabls設定です。
#!/bin/sh IPTABLES=/sbin/iptables ${IPTABLES} -P INPUT DROP ${IPTABLES} -P OUTPUT ACCEPT ${IPTABLES} -P FORWARD DROP ${IPTABLES} -F FORWARD ${IPTABLES} -F INPUT ${IPTABLES} -F OUTPUT # Allow packets in local ${IPTABLES} -A INPUT -i lo -j ACCEPT ${IPTABLES} -A INPUT -s 127.0.0.0/8 -i '!' lo -j DROP # Pass SSH, etc ${IPTABLES} -A INPUT -p tcp -i ppp0 -m multiport --dports 22 -j ACCEPT # Make own rule set chain ${IPTABLES} -F commonrule ${IPTABLES} -X commonrule ${IPTABLES} -N commonrule # Bypass to commonrule ${IPTABLES} -A INPUT -j commonrule ${IPTABLES} -A FORWARD -j commonrule # Allow packets within LAN ${IPTABLES} -A commonrule -i br0 -j ACCEPT # Established packets ${IPTABLES} -A commonrule -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT ${IPTABLES} -A commonrule -p udp -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow ICMP ${IPTABLES} -A commonrule -p icmp -j ACCEPT # Do masqurading ${IPTABLES} -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
|

|