google-cloud-platform - Ubuntu Compute Engine VPS 上的 Google Cloud IKEv2 VPN
问题描述
正如我在标题中所说,我正在安装 strongSwan 并在 VPS 上配置 IKEV2 VPN。
但是,如您所知,GCP 有它的防火墙规则,我对此并不熟悉。
我正在使用这个脚本来安装 strongSwan IKEV2 VPN ( https://github.com/truemetal/ikev2_vpn )
iptables -A INPUT -p udp --dport 500 -j ACCEPT
iptables -A INPUT -p udp --dport 4500 -j ACCEPT
iptables -A FORWARD --match policy --pol ipsec --dir in --proto esp -s 10.10.10.10/24 -j ACCEPT
iptables -A FORWARD --match policy --pol ipsec --dir out --proto esp -d 10.10.10.10/24 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.10.10.10/24 -o eth0 -m policy --pol ipsec --dir out -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.10.10.10/24 -o eth0 -j MASQUERADE
iptables -t mangle -A FORWARD --match policy --pol ipsec --dir in -s 10.10.10.10/24 -o eth0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1361:1536 -j TCPMSS --set-mss 1360
iptables -A INPUT -j DROP
iptables -A FORWARD -j DROP
有人可以帮我将这些规则应用到 GCP 防火墙规则中吗?
解决方案
推荐阅读
- macos - 我在 SwiftUI 中的 macOS 应用程序,计时器在窗口(NSWindow)关闭后从不停止
- registry - Windows 2020 年 5 月 10 日更新中 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FeatureManagement\Overrides\4\ Hive 的用途
- javascript - 如何使用 RequireJs 删除我的模块
- reactjs - TypeError:无法读取未定义 React 的属性“值”,Ant 选择
- python - 我有一个二维数组列表。如何将列表转换为 3 维 numpy 数组?
- batch-file - 使用批处理脚本创建一个文本文件,然后在同一个批处理实例中打开该文本文件
- wordpress - Wordpress ACF 插件黑屏
- python - 将函数应用于熊猫行行叉积
- javascript - 如何使滚动按钮出现和消失
- javascript - 将其值移动到另一个数组后显示整个数组