sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
复制代码
然后打开sudo nano /etc/rc.local,在exit 0之前添加一行:
iptables-restore < /etc/iptables.ipv4.nat
复制代码
此时AP配置完成,可以通过连接树莓派的热点来上网了!
在树莓派上配置AP的一些参考资料:
手动配置AP参考:Using your new Raspberry Pi 3 as a WiFi access point with hostapd
自动配置AP参考:Raspberry Pi 3 access-point-setup · GitHub
设置AP,设置完成后能手机能搜索到热点,但无法上网 Raspberry Pi 3 access-point-setup · GitHub
-dhcpcd5 Raspberry pi stretch allow dhcpcd5 with /etc/network/interfaces · GitHub
允许AP使用有线网卡来链接网络 :Allows passthrough for bridges, wireless access-point’s and range extenders · GitHub
安装ATC
以上AP设置完成后,可以开始部署atc,步骤参考官方文档Augmented Traffic Control