Solve the problem that L2TP cannot be accessed normally after the mac computer is upgraded to Monterey version 12.1 after connecting to the company intranet

Company intranet settings:
L2TP, no shared key.

mac version:
macOS Monterey
version 12.6

Auditors look here, the VPN in the article is not used to circumvent the wall, but to remotely connect to the company's intranet environment.

Configure Connect Company Content

1. System Preferences → Network;
2. Click "➕" in the lower left corner to add a VPN network:
add network
3. Fill in the server address and account name;
4. Click "Authentication Settings" below, and fill in "" under "User Authentication" Password", the others are blank. Click "OK" in the lower right corner;
5. Click "Advanced..." in the lower right corner, and check "Send all traffic through VPN connection" in "Options";
6. Still in "Advanced...", click the "DNS" option Click on the DNS server on the left, click "➕", and fill in the company intranet address. If there are others, just delete them. Click "OK" in the lower right corner;
7. Click "Apply" to save;
8. Open the terminal, enter the /etc/ppp directory, enter the following command sudo vim optionsto create a ppp configuration file;
9. Copy the following content, paste it into the options file, and then :wqSave and exit.

plugin L2TP.ppp
l2tpnoipsec

10. System Preferences → Network, select the configured VPN network, and click the connection button on the right to connect to the company intranet.

At this point, you can use the mac to connect to the company's intranet, and the ping can also be pinged, but it still cannot be accessed normally.

Unable to access normally

This problem has troubled many people for a long time, and even now some people use the curve to save the country to access the company intranet. For example, connect through iPhone/Android mobile phone, connect through virtual machine, connect through router and so on.

I found the easiest way today, I hope it can help more people, and it is convenient for myself to check, so write it down. Reference link: https://blog.csdn.net/xuxingzhuang/article/details/123846050

Before connecting to the company intranet, open the terminal and execute the following two lines of commands:

sudo sysctl net.link.generic.system.hwcksum_tx=0
sudo sysctl net.link.generic.system.hwcksum_rx=0

This should be to modify the settings of the network card. After execution, you can see the prompt of 1 → 0.
After execution, connect to the company's intranet, and then you can access the company's intranet environment normally.

I don’t know what the impact will be after executing the command. To be on the safe side, change it back when you don’t need to connect to the company’s intranet, and change the configuration value to 1:

sudo sysctl net.link.generic.system.hwcksum_tx=1
sudo sysctl net.link.generic.system.hwcksum_rx=1

Guess you like

Origin blog.csdn.net/qq_34972627/article/details/127053500