Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that linux cannot surf the Internet

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

How to solve the problem that linux can't surf the Internet? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

Turn off the firewall

1) take effect after restart

On: chkconfig iptables on off: chkconfig iptables off

2) effective immediately and expire after restart

Enable: service iptables start

Turn off: service iptables stop

1. Check the IP information of the current environment configuration

2. Check whether the network configuration is correct.

[root@hadoop/] # cat / etc/sysconfig/network-scripts/ifcfg-eth0

The network profile IPADDR=192.168.1.226 / / IP address GATEWAY=192.168.1.1 / / gateway address DNS1=8.8.8.8 / / DNS resolution server NETMASK=255.255.255.0 / / subnet mask pointed to by DECIVE=eth0 / /

3. Whether the gateway set under ping can be connected to ping. If the gateway cannot be connected, the gateway address under the / etc/sysconfig/network-scripts/ifcfg-eth0 file needs to be modified.

[root@hadoop/] # ping 192.168.1.1

4. Check whether the DNS server is correct and use the command

[root@hadoop etc] # cat resolv.conf

5. The DNS service configured by ping resolves the address to see if it can be ping. If it cannot be connected, it needs to be modified, but it must be guaranteed to be a normal and usable DNS address.

6. Only after the above configurations are correct, you can connect to the public network resources, and then test whether you can ping the public network resources.

[root@hadoop etc] # ping www.baidu.com

This is the answer to the question about how to solve the problem that linux can not surf the Internet. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report