In fact, most Linux VPN modules (ppp) basically adopt route forwarding. If you want to use Linux to implement the most basic routing (switch) function, you must enable the kernel forwarding service. 1. enable the Linux kernel to forward echo & quot; 1 & quot; & gt;/proc/sys/net/ipv4/ip_forwardSSH and run the preceding commands. if the value is 1, enable the command, and if the value is 0, disable the command.
In fact, most Linux VPN modules (ppp) basically adopt route forwarding. If you want to use Linux to implement the most basic routing (switch) function, you must enable the kernel forwarding service.
1. enable Linux kernel forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
Run the preceding commands in SSH. 1 is enabled, and 0 is disabled.
2. enable automatic startup
vi /etc/sysctl.conf
Modify the following characters
# Controls IP packet forwardingnet. ipv4.ip _ forward = 0 #0 is disabled, 1 is enabled
Save the modification and load it automatically after the next boot.
You can use iptables or ppp to implement NAT. For more information, see the following tutorial.