sysctl net.ipv4.ip_forward
sysctl -w net.ipv4.ip_forward=1
vi /lib/systemd/system/rc-local.service
[Install]
WantedBy=multi-user.target
Alias=rc-local.service
vi /etc/rc.local
#!/bin/sh -e
sysctl -w net.ipv4.ip_forward=1
chmod +x /etc/rc.local
systemctl enable rc-local
systemctl start rc-local
NAT
vi /etc/rc.local
iptables -t nat -A POSTROUTING -j MASQUERADE