The specified IP address cannot access the Internet.
Source: Internet
Author: User
The specified IP address cannot access the Internet-Linux Enterprise Application-Linux server application information. For more information, see. Environment and Symptom description:
After a machine in the LAN is reinstalled, it cannot access the Internet.
The IP address is manually set to 192.168.1.2, so that all Intranet traffic is smooth and the gateway can be accessed normally. The public IP address of the router cannot be pinged. If it is set to another IP address or DHCP address, everything works normally. No problem with Intranet and Internet.
Environment: Use iptables as a firewall to enable NAT access to the public network for all internal machines.
After all the problems are ruled out, the system finally locates Iptables and runs "# iptables-t nat-L-n". The following record is found:
This is very strange. I am not very familiar with iptables. At that time, the purpose of this command should be to set all public IP addresses to 116. *. *. * The access is redirected to 192.168.1.2. In addition, because the network on debian is set as a temporary setting, 116 after the restart. *. *. 9. This address is lost. Then 192.168.1.2 won't be able to access the Internet. If possible, run the following command:
# Ifconfig eth0: 123 116. * netmask implements 255.255.255.248, and then test the machine 192.168.1.2. Everything is normal
After verification, it should be the following command:
Iptables-t nat-I POSTROUTING-s 192.168.1.2-j SNAT -- to 116. * iptables
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.