首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MikroTik路由器设置

MikroTik路由器设置
EN

Server Fault用户
提问于 2016-08-31 09:13:36
回答 1查看 454关注 0票数 0

我只想谈一个问题。我所拥有的:个人电脑与持续集成服务器(它有网络UI):80端口和辛托邦为私人npm包:9314端口。我需要通过AWS MikroTik路由器来解决虚拟专用网问题,我已经有了配置如何做到这一点(*.rsc文件),但是主要的目的是只访问CI服务器的web (仅指80端口),现在我需要以这种方式组织事情:

  1. 通过“public.adress.of.router”连接到CI网络用户界面
  2. 通过'public.adress.of.router:9314‘连接到npm回购的web UI

当前配置:

代码语言:javascript
复制
/interface bridge
add name=hotpsot-bridge
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=hs-pool-2 ranges=10.5.50.2-10.5.50.254
/ip dhcp-server
add address-pool=hs-pool-2 disabled=no interface=hotpsot-bridge lease-time=1h \
    name=dhcp1
/ppp profile
set *FFFFFFFE local-address=10.127.0.1 remote-address=10.127.0.2
/interface pptp-server server
set enabled=yes
/ip address
add address=10.5.50.1/24 comment="hotspot network" interface=hotpsot-bridge \
    network=10.5.50.0
/ip dhcp-client
add disabled=no interface=ether1
/ip dhcp-server network
add address=10.5.50.0/24 comment="hotspot network" gateway=10.5.50.1
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
/ip firewall nat
add action=dst-nat chain=dstnat dst-port=80 protocol=tcp to-addresses=\
    10.127.0.2 to-ports=80
    add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=10.5.50.0/24
add action=masquerade chain=srcnat comment="masquerade PPTP network" \
    src-address=10.127.0.0/24
/ip service
set www disabled=yes
/ppp secret
add name=## password=##

/system identity
set name=##

我在玩NAT规则,使用端口和其他东西,注意到除了规则9314端口在路由器上是关闭的(谢谢,nmap),我想这可能是问题所在,但我仍然要求帮助我解决这个配置问题。

EN

回答 1

Server Fault用户

发布于 2017-07-06 16:28:07

nat规则是不够的,您还需要相应的防火墙过滤规则(前向链):

/ip防火墙过滤器添加chain=forward dst-地址=10.127.0.2 protocol=tcp dst-端口=80 protocol=tcp action=accept

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/800172

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档