LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 803|回复: 2

请问Debian下怎么绑定IP和MAX???

[复制链接]
发表于 2009-3-27 17:01:07 | 显示全部楼层 |阅读模式
请问Debian下怎么,集体绑定IP和MAX比较好?我想做网吧路由器.有没有好的脚本???
发表于 2009-3-27 17:25:49 | 显示全部楼层
MAC吧...我感觉本机绑定没用,路由或交换机绑定才是王道
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-27 18:55:05 | 显示全部楼层
本人在网上找到个脚本,但是不知道具体怎么使用的,大虾能指导一下吗?如下:
Debian 下防止arp病毒的perl脚本


来源: ChinaUnix博客  日期: 2008.07.31 11:17 (共有0条评论) 我要评论
  
#!/usr/bin/perl
use strict;
my $LocalIp="192.168.1.79";
my $file="/tmp/mac.txt";
system("sudo nmap -sP 192.168.1.0/24 > $file");
open(OLD,$file); my @content=;close OLD;
open(NEW,">$file");
foreach my $con (@content)
{
    if( $con =~ /Nmap/ig){$con="";}
    if( $con =~ /$LocalIp/ig){$con="";}
    if($con =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/)
    {
        print "$1\.$2\.$3\.$4\t";
        print NEW "$1\.$2\.$3\.$4\t";
    }
    if($con =~ /(\w+)\\w+)\\w+)\\w+)\w+)\w+)/)
    {
        print "$1\2\3\4\56\n";
        print NEW "$1\2\3\4\56\n";
    }
}
close NEW;
system("sudo arp -f $file");
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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