论坛风格切换切换到宽版
  • 1060阅读
  • 3回复

[问题求助]外网ARP pc0.zz.ha.cn [复制链接]

上一主题 下一主题
离线solai.
 
发帖
2029
C币
-139384
威望
380
贡献值
1
银元
-4
铜钱
4560
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
RedHat AS4.0

在安装时用最.小化安装,IP设好,没设网关服务器
/etc/.sysctl.conf       . net.ipv4.ip_forward=1[成人用品]

/etc/rc.d/rc.loca.l.

tou.ch. /var/lock/subsys/local          婚庆
/sbin./modprobe ip_tables电脑
/sbin/modprobe .ip_nat_ftp[成人用品]
/sbin/modprobe ip_conntra.ck_.ftp外贸
/sbin/i.ptables –F    美容
/sbin/.iptables –F –t nat(        游戏          )
/sb.in/iptables –X              乙肝
/sbin/iptable.s –Z           女人
/.sbin/ip.tables –P INPUT ACCEPT           鲜花
/sbi.n/iptab.les –P FORWARD ACCEPT          婚庆
/sbin/iptables –P OUTPUT ACC.EP.T.
e.cho 1 > /proc/sys/net/ip.v4/ip_forward电影
/sbin/iptables -t nat -.A POSTROUTING -o eth1 -.j MASQUERADE.
/sbin/iptables -t nat -A POST.ROUTING -o eth2 -j MASQ.UERADE--- 印刷
  
ip rule .add to 60.0.0.0/13. table 1虚拟主机
ip rule. add .to 60.8.0.0/15 table 1教育
ip rule .add to 60.10..0.0/16 table 1           女人
..........
arp –f

ip route add 0/0 via 218...28.x.x 投资
ip route. add 0/0 via 219.147.x.x .table 1外贸


/etc/ethers
218.28.xx.xx 000:04:02:10:0Ahttp://upload.bbs.csuboy.com/Mon_1004/126_6931_3b01f95722f71e9.gif[/img]             汽车
219.147.xx..xx 0.0:E0:FC:7C:B4:48.
192.168.0.2 00:1.4:85:.E1:3B:50.
..........


这样正常用了一个多月.,今天突然出现网速变慢          婚庆
用:arp -i eth2 .发现(        游戏          )
Add.ress    .              HWtype  HWaddress           .Flags Mask            Iface             电子
pc0.zz.ha.cn             ether   000:04:02:10:0A   CM                    eth2http://upload.bbs.csuboy.com/Mon_1004/126_6931_3b01f95722f71e9.gif[/img]             汽车
pc0.zz.ha.cn             ether   xxxhttp://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]xhttp://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]xhttp://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]xhttp://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]x       C                      eth2http://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img](        游戏          )
pc0.zz.ha.cn             ether   xxxhttp://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]xhttp://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]xhttp://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]xhttp://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]x       C                      eth2http://upload.bbs.csuboy.com/Mon_1004/126_6931_df017f5679398c9.gif[/img]--- 印刷
里面的xx:xx.:xx:xx:xx:xx是其它路.由的MAC.

求助,怎么去.掉eth2里的非网关地址?            杀毒
注(.网通,电信为一组IP,做有两个双线,两个单线)教育

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线grassgrass.
发帖
2055
C币
-140287
威望
348
贡献值
1
银元
-1
铜钱
4591
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-13
Re:外网ARP
设置静态的mac地址绑定,通过iptables限制访问

离线淡秋.
发帖
2061
C币
-604968
威望
375
贡献值
4
银元
0
铜钱
4631
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-13
Re:外网ARP
arp 实现静态MAC绑定  iptables -A FORWARD -s 218.28.132.38 -j DROP


[root@autocnc ~]# ip route
219.147.xx.xx/29 dev eth1  proto kernel  scope link  src 219.147.xx.xx
218.28.xx.xx/29 dev eth2  proto kernel  scope link  src 218.28.xx.xx
192.168.0.0/22 dev eth0  proto kernel  scope link  src 192.168.0.1
169.254.0.0/16 dev eth2  scope link
default via 218.28.xx.xx dev eth2

[root@autocnc ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
219.147.xx.xx   *               255.255.255.248 U     0      0        0 eth1
218.28.xx.xx   *               255.255.255.248 U     0      0        0 eth2
192.168.0.0     *               255.255.252.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth2
default         pc0.zz.ha.cn    0.0.0.0         UG    0      0        0 eth2

[root@autocnc ~]# arp -i eth2
Address                  HWtype  HWaddress           Flags Mask            Iface
pc0.zz.ha.cn             ether   000:04:02:10:0A   CM                    eth2
pc0.zz.ha.cn             ether   00:06:29:CF:F4:3C   C                     eth2

还是有两个 内网用户在访问外网时还是不正常应该只有一个

离线gongxieyan.
发帖
1937
C币
-193666
威望
358
贡献值
1
银元
-1
铜钱
4382
人人网人气币
0
只看该作者 地板  发表于: 2010-04-13
Re:外网ARP
禁止ARP协议在网卡配置文档里ARP = NO (好像是的)。然后arp -s 绑定一个静态即可。
arp 表项的过少和网速关系不大,如果arp表项异常的话可检查ARP病毒。
快速回复
限100 字节
批量上传需要先选择文件,再选择上传
 
上一个 下一个