添加gre 模塊
sudo modprobe ip_gre
echo ip_gre | sudo tee /etc/modules-load.d/gre.conf
sudo sysctl -w net.ipv4.ip_forward=1
echo “net.ipv4.ip_forward = 1” | sudo tee /etc/sysctl.d/99-gre.conf
sudo sysctl -p /etc/sysctl.d/99-gre.conf
設定 local wan & remote wan IP
sudo nmcli connection add type ip-tunnel \
con-name gre-fgt ifname gre1 \
mode gre \
remote 203.0.113.1 \
local 172.16.3.6
設定tunnel interface ip
sudo nmcli connection modify gre-fgt ipv4.addresses 10.10.10.1/30 ipv4.method manual
sudo nmcli connection up gre-fgt
檢查IP
ip addr show gre1
ip route show