MikroTik 路由器设置

MikroTik 路由器设置

我被一个问题困住了。我拥有:办公室的 PC 带有持续集成服务器(它有 Web UI):80 端口和用于私有 npm 包的 sinopia:9314 端口。我需要通过 AWS MikroTik 路由器设置 vpn,我已经知道如何配置(*.rsc 文件),但主要目的是仅访问 CI 服务器的 Web UI(意味着仅 80 端口),现在我需要以这种方式组织事物:

  1. 通过“public.adress.of.router”连接到 CI Web UI
  2. 通过 'public.adress.of.router:9314' 连接到 npm repo 的 Web UI

当前配置:

/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),我猜这可能是问题所在,但我仍然请求帮助我进行此配置

答案1

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

/ip 防火墙过​​滤器添加链=转发 dst-address=10.127.0.2 协议=tcp dst-port=80 协议=tcp 操作=接受

相关内容