routeros端口映射方法
参与的routeros是2块网卡,ether1连接adsl,做pppoeclient,ether2连接局域网。
首先按照论坛上置顶的说明正确安装并配置routeros,实现客户机能够正常上网。
然后terminalrouteros
改变www服务端口为8081:
/ipservicesetwwwport=8081
改变hotspot服务端口为80,为用户登录页面做准备:
/ipservicesethotspotport=80
Setuphotspotprofiletomarkauthenticateduserswithflowname"hs-auth":
/iphotspotprofilesetdefaultmark-flow="hs-auth"login-method=enabled-address
增加一个用户:
/iphotspotuseraddname=user1password=1
重定向所有未授权用户的tcp请求到hotspot服务
/ipfirewalldst-nataddin-interface="ether2"flow="!hs-auth"protocol=tcpaction=redirect
to-dst-port=80comment="redirectunauthorizedclientstohotspotservice"
允许dns请求、icmpping;拒绝其他未经认证的所有请求:
/ipfirewalladdname=hotspot-tempcomment="limitunauthorizedhotspotclients"
/ipfirewallruleforwardaddin-interface=ether2action=jump
jump-target=hotspot-tempcomment="limitaccessforunauthorizedhotspotclients"
/ipfirewallruleinputaddin-interface=ether2dst-port=80protocol=tcp
action=acceptcomment="acceptrequestsforhotspotservlet"
/ipfirewallruleinputaddin-interface=ether2dst-port=67protocol=udp
action=acceptcomment="acceptrequestsforlocalDHCPserver"
/ipfirewallruleinputaddin-interface=ether2action=jump
jump-target=hotspot-tempcomment="limitaccessforunauthorizedhotspotclients"
/ipfirewallrulehotspot-tempaddflow="hs-auth"action=return
comment="returnifconnectionisauthorized"
/ipfirewallrulehotspot-tempaddprotocol=icmpaction=return
comment="allowpingrequests"
/ipfirewallrulehotspot-tempaddprotocol=udpdst-port=53action=return
comment="allowdnsrequests"
/ipfirewallrulehotspot-tempaddaction=reject
comment="rejectaccessforunauthorizedclients"
创建hotspot通道给认证后的hotspot用户
Createhotspotchainforauthorizedhotspotclients:
/ipfirewalladdname=hotspotcomment="accountauthorizedhotspotclients"
Passallthroughgoingtraffictohotspotchain:
/ipfirewallruleforwardaddaction=jumpjump-target=hotspot
comment="accounttrafficforauthorizedhotspotclients"
客户机输入任何网址,都自动跳转到登陆页面,输入账号密码,继续浏览。
如果使用ftp、pop3等,也必须先通过网页登录,才可以使用,当然使用winbox的时候也必须先登录。
- 随机文章
- 核心危机(核心危机魔石合成攻略)
- 风儿(风儿轻轻的吹)
- 饿了么红包怎么用(饿了么红包怎么用微信支付)
- 儿童教育文章(儿童教育)
- 光遇花手先祖位置(安卓光遇手花先祖)
- 广州4a广告公司(广州4a广告公司创意总监年薪)
- 抖音卡(抖音卡顿怎么解决)
- 兵马俑(兵马俑介绍和历史背景)
- 帆船比赛(帆船比赛视频)
- 韩国媳妇和小雪(韩国媳妇和小雪的父亲工资是多少)
- 儋州市第二中学(儋州市第二中学录取分数线)
- 鬼泣5攻略(鬼泣5攻略第三关怎么跳)
- 地球日主题(2020年世界地球日主题)
- 和柳亚子(和柳亚子先生于田)
- yy魔兽(yy魔兽世界)
- 充值卡代理(充值卡代理加盟)
- 郭妮小说(恶魔的法则郭妮小说)
- 东天目山(东天目山景区)
- 蝙蝠给人类的一封信(蝙蝠给人类的一封信)
- 大松电饭煲(美的大松电饭煲)
- 服饰加盟(服饰加盟店招商)
- 疯狂填字(疯狂填字5)
- 观音普门品(观音普门品念诵全文)
- 河北省大运会(河北省大运会时间)
- 骇客神条(骇客神条怎么辨别真假)
- 杜星霖(杜星霖图片)
- 查传倜(查传倜个人生活)
- 广州晓港公园(广州晓港公园正门图片)
- 钢筋等级符号(钢筋等级符号电脑怎么输入)
- 常州天宁寺(常州天宁寺求什么灵验)
