A Linux system accesses the Internet through another Windows server

Application scenarios:

 

There is a laptop with centos system installed, with its own network card and WIFI;

There is a desktop computer with windows7 system installed, with its own network card and WIFI, and the windows7 desktop computer has been connected to the external network through wifi.

 

Question: How to connect the laptop linux system to the Internet through the windows desktop computer?

 

step:

 

1 Connect the laptop and desktop with a network cable

 

2 Internet sharing for desktop windows

   There is a lot about sharing steps online,

   Excerpt: Right-click on the external network card WIFI of win - Properties - Sharing in the upper part of the dialog box - Tick the checkbox of Internet sharing - select the network card of the internal network in the drop-down box below - OK.
Such as the internal network card (local connection) configuration:

ip: 192.168.137.1

Subnet mask: 255.255.255.0

 

3 The gateway of the linux host points to the windows intranet IP

   Wired network card:

ip: 192.168.137.100

Subnet mask: 255.255.255.0

Gateway: 192.168.137.1

DNS:

10.8.128.10

10.8.128.11

 

4 Ping each other's ip, whether they are connected

 

5 DNS must be configured

 

If it is not configured, the webpage cannot be opened, even if the ping is connected

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326409183&siteId=291194637