Article title: enable internet gateway by default in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
After the network adapter is restarted, the default route gateway becomes an intranet gateway and cannot be directly accessed from the Internet. In this case, you need to delete the intranet gateway, add the Internet gateway, delete the Gateway information recorded by the intranet Nic, and then restart the NIC. The following are related commands.
Restart Nic
/Etc/init. d/network restart
Add default gateway
/Sbin/route add default netmask 0.0.0.0 gw 202. *. *. 1
Delete default intranet gateway
/Sbin/route delete default netmask 0.0.0.0 gw 10.1.56.1
Modify intranet Nic vi/etc/sysconfig/network-scripts/ifcfg-eth1
Delete gatway settings