Meraki—DNAT_over_IPSEC

Situation

DDNS綁定WAN IP,DNAT mapping至LAN網段。

Practical Testing

因為4G有CGNAT的限制,設備IP是不能做DNAT的。

Security & SDWAN > Monitor > Appliance Status > Uplink
- Configuration > General > PUBLIC IP > "Public IP(APN)"
這裡的public ip並非設備的IP,而是機房的NAT IP。

- Cellular > Address > "private_IP"
這才是設備本身的IP。

> 所以DNAT會失敗。

Solution

1. 申請4G固定IP。

2. 跟別人做IPSEC,使用DNAT over IPSEC。

[1] Security & SDWAN > Configure > Firewall

[2] 
Forwarding rules > Port forwarding : 只能用介面(Both, Internet1, Internet2)做同一個IP但多個Port forwarding。
Forwarding rules > 1:1 NAT : 可以用非介面做1對1的DNAT,但不能換Port。
Forwarding rules > 1:Many NAT	: 可以用非介面IP做同一個IP但多個Port forwarding。

[3]
Security & SDWAN > Configure > Site-to-site VPN > Hub(Mesh)雙邊啟用。

[4]
Security & SDWAN > Monitor > Route Table > 確認Meraki VPN: VLAN的路由會起來。

[5-1]
DNAT for "Meraki":
- Security & SDWAN > Configure > Addressing & VLANs > Routing > Source-based default routes
- Click "Add source-based route"
- Type VPN > Sources(VLAN) > next hop(tunnel next hop)

[5-2]
DNAT for "Fortigate":
- SNAT + DNAT > 讓返回的流量不走Default Route出外網即可。

[6]
Security & SDWAN > Monitor > Route Table > 確認Local Source-based Static Route。