找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: 心想事成

[coyote] [分享]在coyote中只允许指定mac地址和IP的电脑可以上网

[复制链接]
发表于 2007-5-31 12:45:40 | 显示全部楼层
楼主的方法是底层的,你所用的WEBADMIN只是基于它的实现。
routeros
回复

使用道具 举报

发表于 2007-6-18 11:41:01 | 显示全部楼层
学习,,,
routeros
回复

使用道具 举报

发表于 2007-6-21 11:44:21 | 显示全部楼层
同意13楼的观点.BTW:ARP欺骗可以用sendarp.tgz解决.效果很好.再用下面的脚本在客户机绑定网关MAC就更好了.
@echo off
rem 经测试,能在客户端绑定自己的IP与MAC,网关的IP与MAC.注意:多网卡环境下要保证只开一个网卡,否则不能正确绑定.

rem 清除所有的ARP缓存
arp -d

rem 读取本地连接配置
ipconfig /all>ipconfig.txt

rem 读取内网网关的IP
for /f "tokens=13" %%I in ('find "Default Gateway" ipconfig.txt') do set GatewayIP=%%I

rem PING一次内网网关
ping %GatewayIP% -n 1

rem 读取与网关arp缓存
arp -a|find "%GatewayIP%">arp.txt

rem 读取网关MAC并绑定
for /f "tokens=1,2" %%I in ('find "%GatewayIP%" arp.txt') do if %%I==%GatewayIP% arp -s %%I %%J

rem 读取本机的 IP+MAC
for /f "tokens=15" %%i in ('find "IP Address" ipconfig.txt') do set ip=%%i
for /f "tokens=12" %%i in ('find "Physical Address" ipconfig.txt') do set mac=%%i

rem 绑定本机的 IP+MAC
arp -s %ip% %mac%

rem 删除所有的临时文件
del ipconfig.txt
del arp.txt
exit
routeros
回复

使用道具 举报

发表于 2007-7-11 18:38:13 | 显示全部楼层
这么老的帖子也翻出来了呀
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-27 16:24 , Processed in 0.041772 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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