免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1413 | 回复: 0
打印 上一主题 下一主题

RouterOS的Hotspot设置说明 [复制链接]

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-25 00:21 |只看该作者 |倒序浏览

参照routeros的手册,针对我的情况作了部分修改。已经在2.7.14和2.8.11上测试通过。
我的routeros是2块网卡,ether1连接adsl,做pppoe client,ether2连接局域网。
首先按照论坛上置顶的说明正确安装并配置routeros,实现客户机能够正常上网。
然后terminal routeros
改变www服务端口为8081:
/ip service set www port=8081
改变hotspot服务端口为80,为用户登录页面做准备:
/ip service set hotspot port=80
Setup hotspot profile to mark authenticated users with flow name "hs-auth":
/ip hotspot profile set default mark-flow="hs-auth" login-method=enabled-address
增加一个用户:
/ip hotspot user add "name"=user1 password=1
重定向所有未授权用户的tcp请求到hotspot服务
/ip firewall dst-nat add in-interface="ether2" flow="!hs-auth" protocol=tcp action=redirect
to-dst-port=80 comment="redirect unauthorized clients to hotspot service"
允许dns请求、icmp ping ;拒绝其他未经认证的所有请求:
/ip firewall add "name"=hotspot-temp comment="limit unauthorized hotspot clients"
/ip firewall rule forward add in-interface=ether2 action=jump
jump-target=hotspot-temp comment="limit access for unauthorized hotspot clients"
/ip firewall rule input add in-interface=ether2 dst-port=80 protocol=tcp
action=accept comment="accept requests for hotspot servlet"
/ip firewall rule input add in-interface=ether2 dst-port=67 protocol=udp
action=accept comment="accept requests for local DHCP server"
/ip firewall rule input add in-interface=ether2 action=jump
jump-target=hotspot-temp comment="limit access for unauthorized hotspot clients"
/ip firewall rule hotspot-temp add flow="hs-auth" action=return
comment="return if connection is authorized"
/ip firewall rule hotspot-temp add protocol=icmp action=return
comment="allow ping requests"
/ip firewall rule hotspot-temp add protocol=udp dst-port=53 action=return
comment="allow dns requests"
/ip firewall rule hotspot-temp add action=reject
comment="reject access for unauthorized clients"
创建hotspot通道给认证后的hotspot用户
Create hotspot chain for authorized hotspot clients:
/ip firewall add "name"=hotspot comment="account authorized hotspot clients"
Pass all through going traffic to hotspot chain:
/ip firewall rule forward add action=jump jump-target=hotspot
comment="account traffic for authorized hotspot clients"
客户机输入任何网址,都自动跳转到登陆页面,输入账号密码,继续浏览。
如果使用ftp、pop3等,也必须先通过网页登录,才可以使用,当然使用winbox的时候也必须先登录.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_705095.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP