[問題] ROS 雙PPPOE指定設備出口與HAIRPIN NAT

看板Broad_Band (寬頻網路)作者 (菜逼八)時間4年前 (2022/03/22 16:42), 編輯推噓1(106)
留言7則, 3人參與, 4年前最新討論串1/1
是這樣, 我有個RB750Gr3, 架構大概如下, https://imgur.com/PMakKy6
我希望手機在內網, 可以透過 my_domain_B 連回NAS, 可是摸了好幾天還是不會弄, 請求協助。 /ip firewall address-list add address=192.168.1.0/24 list=LAN_IP add address=my_domain_A list=WAN_IP add address=my_domain_B list=NEXTCLOUD_WAN_IP /ip firewall mangle add action=mark-connection chain=input in-interface=pppoe-out1 \ new-connection-mark=pppoe1_conn passthrough=yes add action=mark-routing chain=output connection-mark=pppoe1_conn \ new-routing-mark=normal_wan passthrough=yes add action=mark-connection chain=input in-interface=pppoe-out2 \ new-connection-mark=pppoe2_conn passthrough=yes add action=mark-routing chain=output connection-mark=pppoe2_conn \ new-routing-mark=nextcloud_wan passthrough=yes /ip firewall nat add action=masquerade chain=srcnat comment="HAIRPIN NAT" dst-address=\ 192.168.1.0/24 src-address=192.168.1.0/24 add action=masquerade chain=srcnat comment="Local to WAN" out-interface-list=\ WAN add action=masquerade chain=srcnat comment="Local to LAN" disabled=yes \ out-interface-list=LAN add action=dst-nat chain=dstnat comment="IP CAM_WANin" dst-address-list=\ WAN_IP dst-port=9999 protocol=tcp to-addresses=192.168.1.7 to-ports=8888 add action=dst-nat chain=dstnat comment=NextCloud_WANin dst-address-list=\ NEXTCLOUD_WAN_IP dst-port=80 protocol=tcp to-addresses=192.168.1.12 \ to-ports=80 add action=dst-nat chain=dstnat dst-address-list=NEXTCLOUD_WAN_IP dst-port=\ 443 protocol=tcp to-addresses=192.168.1.12 to-ports=443 /ip route add distance=1 gateway=pppoe-out1 routing-mark=normal_wan add distance=1 gateway=pppoe-out2 routing-mark=nextcloud_wan add distance=1 gateway=pppoe-out1 add distance=2 gateway=pppoe-out2 /ip route rule add src-address=192.168.1.12/32 table=nextcloud_wan /interface pppoe-client add disabled=no interface=ether1 name=pppoe-out1 password=USRPWD1 \ use-peer-dns=yes user=USER1 add disabled=no interface=ether1 name=pppoe-out2 password=USRPWD2 \ use-peer-dns=yes user=USER2 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.170.254.217 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Broad_Band/M.1647938551.A.501.html

03/22 17:09, 4年前 , 1F
沒特殊需求的話,直接去設static dns,把該domain直
03/22 17:09, 1F

03/22 17:09, 4年前 , 2F
接對應到internal ip會不會比較快?
03/22 17:09, 2F

03/22 17:15, 4年前 , 3F
我自己是設MANGLE
03/22 17:15, 3F

03/23 07:43, 4年前 , 4F
你是要全指給nas還是單port? 這好像會有loopback問題
03/23 07:43, 4F

03/24 01:37, 4年前 , 5F
無法理解,為何要dual wan去轉送,沒意義
03/24 01:37, 5F

03/24 01:48, 4年前 , 6F

03/24 01:49, 4年前 , 7F
相同橋接,進來的位置若屬於local一率轉送內部srv
03/24 01:49, 7F
文章代碼(AID): #1YEOltK1 (Broad_Band)
文章代碼(AID): #1YEOltK1 (Broad_Band)