|
|
因为有两块网卡的linux电脑做了一个动作就是
让192.168.6.0和192.168.7.0这个段可以互通的...所以你看到了如下信息
[root@shlinux root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.7.0 * 255.255.255.0 U 0 0 0 eth0
192.168.6.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.7.252 0.0.0.0 UG 0 0 0 eth0
因为公司有一路由器..DHCP由有两块网卡的linux分配
在dhcpd.conf把网关都是指向路由器就和分相应的DNS就可以上网了
现在我把网关指向了
那台linux电脑...............
然后其中加了一条语句..
route add default gw 192.168.7.252 eth0
其中192.168.7.252为路由器的地址...
这样192.168.7.101是可以上外网的...
但是我想通过
[root@shlinux root]# iptables -A INPUT -s 192.168.7.101 -p tcp --dport 80 -j DROP
去限制...192.168.7.112不让其上外网...
不过,不行也...
不知道为什么... |
|