auto loauto eth0iface lo inet loopback up /etc/network/firewall# The primary network interfaceallow-hotplug eth0iface eth0 inet static ### Интерфейс лоя модема address 10.10.0.2 netmask 255.255.0.0 network 10.10.0.0 broadcast 10.10.255.255 auto eth1 iface eth1 inet static ###Интерфейс для внетренней сети address 192.168.100.100 netmask 255.255.255.0 network 255.255.255.0 broadcast 192.168.0.255auto eth2iface eth2 inet static address xxx.xxx.xxx.xxx netmask 255.255.255.192
ETH='eth0'USER='xxxxxxxxxxx'DEMAND=noDNSTYPE=NOCHANGEPEERDNS=noDNS1=195.38.32.2DNS2=195.38.33.2DEFAULTROUTE=yesCONNECT_TIMEOUT=30CONNECT_POLL=2ACNAME=SERVICENAME=usiPING="."CF_BASE=`basename $CONFIG`PIDFILE="/var/run/$CF_BASE-adsl.pid"SYNCHRONOUS=noCLAMPMSS=1412LCP_INTERVAL=5LCP_FAILURE=30PPPOE_TIMEOUT=80FIREWALL=NONELINUX_PLUGIN=PPPOE_EXTRA=""PPPD_EXTRA=""
#!/bin/shecho "1" > /proc/sys/net/ipv4/ip_forwardecho "0" > /proc/sys/net/ipv4/conf/all/proxy_arpecho "1" > /proc/sys/net/ipv4/conf/all/rp_filterLOCALNET="192.168.100.0/24"iptables -F INPUTiptables -F OUTPUTiptables -F FORWARDiptables -P INPUT DROPiptables -P OUTPUT ACCEPTiptables -P FORWARD DROPiptables -A FORWARD -j ULOG --ulog-nlgroup 1 --ulog-cprange 48 \ --ulog-qthreshold 50 --ulog-prefix "FORWARD"#iptables -t nat -A PREROUTING -s $LOCALNET -p tcp -m multiport --dport 80,81,82,83,88,8080,8081,8000 -j REDIRECT --to-port 111iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPTiptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPTiptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPTiptables -A FORWARD -s $LOCALNET -j ACCEPTiptables -A INPUT -s $LOCALNET -j ACCEPTiptables -A INPUT -p icmp -j ACCEPTiptables -A INPUT -p tcp --dport 22 -j ACCEPTiptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
route add -net 78.139.64.0/18 dev eth2route add -net 80.78.103.0/28 dev eth2route add -net 80.78.104.0/28 dev eth2route add -net 80.78.114.0/28 dev eth2route add -net 80.78.115.0/28 dev eth2.......... и так далее для фсех подсетей
DNSTYPE=SERVERPEERDNS=yesDNS1=DNS2=DEFAULTROUTE=yes