2 拠点のルーター間を IPSec(IKEv2)で接続し、拠点間のサブネットを相互に到達可能にする構成例です。事前共有鍵(PSK)で認証します。
vpn-peer.example.com に接続s2s(VPN 名は最大 4 文字){
"version": "1.0",
"network": {
"wan": { "wan0": { "ipv4": [{ "mode": "dhcp" }], "ipv6": [{ "mode": "disabled" }] } },
"lan": {
"lan0": {
"default": true,
"ipv4": { "mode": "static", "address": "192.168.0.1/24" },
"dhcp": { "enabled": true, "rangeStart": "192.168.0.100", "rangeEnd": "192.168.0.150", "leaseTime": "12h" }
}
},
"ports": {
"sfp0": { "mode": "access", "network": "wan0" },
"eth0": { "mode": "access", "network": "lan0" },
"eth1": { "mode": "access", "network": "lan0" },
"eth2": { "mode": "access", "network": "lan0" },
"eth3": { "mode": "access", "network": "lan0" }
},
"vpn": {
"s2s": {
"type": "ipsec",
"displayName": "拠点間 VPN",
"ipsec": {
"ifId": 100,
"sourceConnection": { "interface": "wan0", "ipVersion": "ipv4", "connection": 0 },
"gateway": "vpn-peer.example.com",
"preSharedKey": "REPLACE_WITH_PRE_SHARED_KEY",
"ikeProposal": { "encryption": "aes256", "hash": "sha256", "dhGroup": "modp2048" },
"espProposal": { "encryption": "aes256gcm", "dhGroup": "modp2048" },
"localSubnets": ["192.168.0.0/24"],
"remoteSubnets": ["10.20.0.0/16"]
}
}
}
},
"firewall": {
"defaults": { "input": "drop", "output": "accept", "forward": "drop" },
"zones": {
"lan": { "members": ["lan0"], "input": "accept", "output": "accept", "forward": "accept" },
"wan": { "members": ["wan0"], "input": "drop", "output": "accept", "forward": "drop", "nat": true }
},
"forwardings": [{ "from": "lan", "to": "wan" }]
},
"system": {
"hostname": "my-router",
"timezone": "Asia/Tokyo",
"maintenanceWindows": [
{ "dayOfWeek": 0, "startTime": "02:00", "durationMinutes": 120, "timezone": "Asia/Tokyo" }
]
}
}