找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2907|回复: 0

如果光纖掉線,可不可以直接切到ADSL

[复制链接]
发表于 2006-6-28 11:18:41 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
?是我的光??的如果光???那天掉?可不可以自?切到adsl上?啊




#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

var/lock/subsys/local
#******Start set var**********
WAN_IP="192.168.8.22"
LAN_IP="192.168.8.23"
LAN_NET="192.168.8.0/24"
#****** End set var **********

#and you can modify "/etc/sysctl.conf"
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "81920" > /proc/sys/net/ipv4/ip_conntrack_max
modprobe ip_tables
modprobe ip_nat_ftp
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe iptable_filter
modprobe iptable_nat
modprobe ip_nat_ftp
#modprobe ip_nat_pptp
#modprobe ip_conntrack_proto_gre
iptables -F
iptables -X
iptables -Z
iptables -F -t nat
iptables -X -t nat
iptables -Z -t nat
iptables -P INPUT   ACCEPT
iptables -P OUTPUT  ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -P PREROUTING  ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT      ACCEPT
iptables -t filter -A INPUT   -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t filter -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t filter -A FORWARD -o eth1 -p all -j ACCEPT

#*************************Start open localhost service's port****************************
#iptables -t filter -A INPUT -p icmp --icmp-type 8 -j ACCEPT            # Ping answer
iptables -t filter -A INPUT -i eth0 -p tcp  --dport  22    -j ACCEPT    # SSH
iptables -t filter -A INPUT -i eth0 -p udp  --dport  53    -j ACCEPT    # DNS
iptables -t filter -A INPUT -i eth0 -p tcp  --dport  53    -j ACCEPT    # DNS
iptables -t filter -A INPUT -i eth0 -p tcp  --dport 113    -j ACCEPT    # auth
#iptables -t filter -A INPUT -i eth0 -p tcp --dport 25     -j ACCEPT    # SMTP
#iptables -t filter -A INPUT -i eth0 -p tcp --dport 110    -j ACCEPT    # POP3
#iptables -t filter -A INPUT -i eth0 -p tcp --dport 80     -j ACCEPT    # WWW
#iptables -t filter -A INPUT -i eth0 -p tcp --dport 443    -j ACCEPT    # WWW
#*************************End open localhost service's port******************************


#**********************************Start Add Routing*************************************
#Route to Taibei chenbro
route add -net 172.22.16.0 netmask 255.255.240.0 gw 192.168.8.251
#Route to Taoyuan chenbro
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.8.251
#Route to Dongguan chenbro
route add -net 172.22.80.0 netmask 255.255.240.0 gw 192.168.8.251
#***********************************End Add Routing**************************************

#*******************************Start Internet control center****************************
#________________________________________________________
#   User Name         | Type |     MAC Address     | MARK
#________________________________________________________
#K0035                  PC      00:16:76:2C:5B:24
#C0242                  NB      00:0c:29:c7:3d:9e
#TEST                   NB      00:0c:6e:4b:07:d9
#______________________________________________________
MAC="
00:16:76:2C:5B:24
00:0c:29:c7:3d:9e
00:0c:6e:4b:07:d9
"
for i in $MAC
do
  iptables -t filter -A FORWARD -p all -m mac --mac-source $i -j ACCEPT
done
#*******************************End Internet control center******************************
routeros
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-7-6 14:20 , Processed in 0.055445 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表