AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 813447
Accepted
Lucas Kauffman
Lucas Kauffman
Asked: 2016-11-07 01:49:37 +0800 CST2016-11-07 01:49:37 +0800 CST 2016-11-07 01:49:37 +0800 CST

Mikrotik:即使规则似乎匹配,防火墙也会丢弃数据包

  • 772

我在我的 Mikrotik 上设置了一个 L2TP VPN 服务器。当我在路由器后面时连接到 VPN 是可行的,但是一旦我从 WAN 端连接,它就不行了。我记录了我的防火墙,看看我是否使用默认的删除规则删除了它,它是:

WANDROP input: in:ether1-gateway out:(none), src-mac 00:00:5e:00:01:66, proto UDP, 5.6.7.8:38211->1.2.3.4:500, len 412

但是我的规则是这样设置的:

add action=accept chain=input dst-address=1.2.3.4 dst-port=500,1701,4500 in-interface=ether1-gateway log=yes protocol=udp src-address=0.0.0.0
    add action=accept chain=input dst-address=1.2.3.4 in-interface=ether1-gateway log=yes protocol=ipsec-esp src-address=0.0.0.0
    add action=drop chain=input comment="default configuration" in-interface=ether1-gateway log=yes log-prefix=WANDROP
    add action=accept chain=input comment="default configuration" connection-state=established,related
    add action=accept chain=forward comment="default configuration" connection-state=established,related
    add action=drop chain=forward comment="default configuration" connection-state=invalid
    add action=drop chain=forward comment="default configuration" connection-nat-state=!dstnat connection-state=new in-interface=ether1-gateway log=yes log-prefix=DROP
    /ip firewall nat
    add action=dst-nat chain=dstnat dst-address=1.2.3.4 dst-port=80 in-interface=ether1-gateway protocol=tcp to-addresses=192.168.88.232 to-ports=80
    add action=masquerade chain=srcnat comment="default configuration" out-interface=ether1-gateway

不知道我做错了什么或错过了什么。

routeros
  • 1 1 个回答
  • 2531 Views

1 个回答

  • Voted
  1. Best Answer
    pilsetnieks
    2017-03-18T02:51:50+08:002017-03-18T02:51:50+08:00

    您的接受规则将源地址设置为0.0.0.0没有掩码,这就是它们不匹配任何内容的原因。如果有0.0.0.0,路由器会尝试仅匹配特定于0.0.0.0地址的数据包。既然你想匹配一切(我假设)它应该是0.0.0.0/0.

    • 3

相关问题

  • 如何破解机场极速以支持 USB 3G 调制解调器?[关闭]

  • MikroTik 与 Cisco 的 WiFi 网桥应用

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve