TCP 正常获取源 IP
UDP 获取到的是 RouterOS 的 IP
8 ;;; Test
chain=dstnat action=dst-nat to-addresses=192.168.1.52 protocol=udp
dst-port=12345 log=no log-prefix=""
9 chain=dstnat action=dst-nat to-addresses=192.168.1.52 protocol=tcp
dst-port=12345 log=no log-prefix=""
要如何配置才能正确 UDP 端口转发源 IP
1
hefish 15 小时 26 分钟前
你这还有其他规则吧,要一并贴一下才行,就你贴的这两个规则,是没问题的。
|
2
ZRS 12 小时 34 分钟前
检查 masquerade 配置
|
3
577fkj OP @hefish @ZRS
``` [admin@MikroTik] /ip/firewall/nat> print Flags: X - disabled, I - invalid; D - dynamic 0 ;;; FullCone chain=srcnat action=endpoint-independent-nat randomise-ports=no protocol=udp log=no log-prefix="" 1 chain=dstnat action=endpoint-independent-nat randomise-ports=no protocol=udp log=no log-prefix="" 2 ;;; Hairpin NAT chain=srcnat action=masquerade src-address=192.168.1.0/24 dst-address=192.168.1.0/24 out-interface-list=LAN log=no log-prefix="" 3 ;;; defconf: masquerade IPv4 chain=srcnat action=masquerade out-interface-list=WAN log=no log-prefix="" 4 ;;; onuconf: access to ONU chain=srcnat action=masquerade src-address-list=local_lan_ipv4 dst-address-list=local_onu_ipv4 out-interface-list=ONU 5 ;;; Test chain=dstnat action=dst-nat to-addresses=192.168.1.52 protocol=udp dst-port=12345 log=no log-prefix="" 6 chain=dstnat action=dst-nat to-addresses=192.168.1.52 protocol=tcp dst-port=12345 log=no log-prefix="" ``` 还需要哪的配置吗 |