设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
Linux 发行版讨论区 —— LinuxSir.cn
›
Debian Linux
›
请问Debian下怎么绑定IP和MAX???
返回列表
查看:
804
|
回复:
2
请问Debian下怎么绑定IP和MAX???
[复制链接]
qcbwert21q
qcbwert21q
当前离线
积分
14
IP卡
狗仔卡
发表于 2009-3-27 17:01:07
|
显示全部楼层
|
阅读模式
请问Debian下怎么,集体绑定IP和MAX比较好?我想做网吧路由器.有没有好的脚本???
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
adam8157
adam8157
当前离线
积分
1035
IP卡
狗仔卡
发表于 2009-3-27 17:25:49
|
显示全部楼层
MAC吧...我感觉本机绑定没用,路由或交换机绑定才是王道
回复
支持
反对
使用道具
举报
显身卡
qcbwert21q
qcbwert21q
当前离线
积分
14
IP卡
狗仔卡
楼主
|
发表于 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\
5
6\n";
print NEW "$1\
2\
3\
4\
5
6\n";
}
}
close NEW;
system("sudo arp -f $file");
回复
支持
反对
使用道具
举报
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表