Disabling IP Forwarding on the Standby ECS
For a Linux ECS:
- Log in to standby ECS and run the following command to check whether the IP forwarding is enabled:
cat /proc/sys/net/ipv4/ip_forward
In the command output, 1 indicates it is enabled, and 0 indicates it is disabled. The default value is 0.
- Use the vi editor to open the /etc/sysctl.conf file, change the value of net.ipv4.ip_forward to 0, and enter :wq to save the change and exit. You can also use the sed command to modify the configuration. A command example is as follows:
sed -i '/net.ipv4.ip_forward/s/1/0/g' /etc/sysctl.conf
- Run the following command to make the change take effect:
For a Windows ECS:
- Click Start, scroll down and expand the Windows System folder, click Command Prompt, and run the following command:
ipconfig /all
In the command output, if the value of IP Routing Enabled is No, the IP forwarding function is disabled.
- Press Windows and R keys together to open the Run box, and enter regedit to open the Registry Editor.
- Set the value of IPEnableRouter under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to 0.
- If the value is set to 0, IP forwarding will be disabled.
- If the value is set to 1, IP forwarding will be enabled.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.