hwdsl2 / setup-ipsec-vpn

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
Other
24.96k stars 6.28k forks source link

Ubuntu24.04-- networkd-dispatcher[22530]: WARNING:Unknown index 6 seen, reloading interface list #1598

Closed LedbetterBlog closed 1 week ago

LedbetterBlog commented 1 week ago

--I can access the server, but there will be an error message showing that I cannot establish a connection to the remote computer --I checked the system log and it showed an error. It shows that there is an issue with the networked dispatcher [22530]: Warning: Unknown index 6 seen, reloading interface list, but I don't know how to solve it

sys message: root@ip-172-31-6-11:~# sudo tail -f /var/log/syslog 2024-09-08T08:11:53.098963+00:00 ip-172-31-6-11 kernel: l2tp_ppp: PPPoL2TP kernel driver, V2.0 2024-09-08T08:11:53.099119+00:00 ip-172-31-6-11 xl2tpd[29673]: Using l2tp kernel support. 2024-09-08T08:11:53.100315+00:00 ip-172-31-6-11 xl2tpd[29669]: Starting xl2tpd: xl2tpd. 2024-09-08T08:11:53.100363+00:00 ip-172-31-6-11 systemd[1]: Started xl2tpd.service - LSB: layer 2 tunelling protocol daemon. 2024-09-08T08:11:53.103877+00:00 ip-172-31-6-11 xl2tpd[29675]: xl2tpd version xl2tpd-1.3.18 started on ip-172-31-6-11 PID:29675 2024-09-08T08:11:53.103928+00:00 ip-172-31-6-11 xl2tpd[29675]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc. 2024-09-08T08:11:53.103958+00:00 ip-172-31-6-11 xl2tpd[29675]: Forked by Scott Balmos and David Stipp, (C) 2001 2024-09-08T08:11:53.103984+00:00 ip-172-31-6-11 xl2tpd[29675]: Inherited by Jeff McAdams, (C) 2002 2024-09-08T08:11:53.104009+00:00 ip-172-31-6-11 xl2tpd[29675]: Forked again by Xelerance (www.xelerance.com) (C) 2006-2016 2024-09-08T08:11:53.104039+00:00 ip-172-31-6-11 xl2tpd[29675]: Listening on IP address 0.0.0.0, port 1701 2024-09-08T08:12:01.559098+00:00 ip-172-31-6-11 xl2tpd[29675]: Connection established to 119.123.133.169, 40151. Local: 59749, Remote: 6 (ref=0/0). LNS session is 'default' 2024-09-08T08:12:01.559985+00:00 ip-172-31-6-11 xl2tpd[29675]: check_control: Received out of order control packet on tunnel 6 (got 3, expected 2) 2024-09-08T08:12:01.560051+00:00 ip-172-31-6-11 xl2tpd[29675]: handle_control: bad control packet! 2024-09-08T08:12:01.786133+00:00 ip-172-31-6-11 xl2tpd[29675]: write_packet: tty is not open yet. 2024-09-08T08:12:01.887791+00:00 ip-172-31-6-11 xl2tpd[29675]: check_control: Received out of order control packet on tunnel 6 (got 4, expected 3) 2024-09-08T08:12:01.887878+00:00 ip-172-31-6-11 xl2tpd[29675]: handle_control: bad control packet! 2024-09-08T08:12:01.887904+00:00 ip-172-31-6-11 xl2tpd[29675]: start_pppd: I'm running: 2024-09-08T08:12:01.887932+00:00 ip-172-31-6-11 xl2tpd[29675]: "/usr/sbin/pppd" 2024-09-08T08:12:01.887972+00:00 ip-172-31-6-11 xl2tpd[29675]: "plugin" 2024-09-08T08:12:01.887999+00:00 ip-172-31-6-11 xl2tpd[29675]: "pppol2tp.so" 2024-09-08T08:12:01.888026+00:00 ip-172-31-6-11 xl2tpd[29675]: "pppol2tp" 2024-09-08T08:12:01.888052+00:00 ip-172-31-6-11 xl2tpd[29675]: "7" 2024-09-08T08:12:01.888076+00:00 ip-172-31-6-11 xl2tpd[29675]: "pppol2tp_lns_mode" 2024-09-08T08:12:01.888102+00:00 ip-172-31-6-11 xl2tpd[29675]: "pppol2tp_tunnel_id" 2024-09-08T08:12:01.888130+00:00 ip-172-31-6-11 xl2tpd[29675]: "59749" 2024-09-08T08:12:01.888156+00:00 ip-172-31-6-11 xl2tpd[29675]: "pppol2tp_session_id" 2024-09-08T08:12:01.888181+00:00 ip-172-31-6-11 xl2tpd[29675]: "35324" 2024-09-08T08:12:01.888206+00:00 ip-172-31-6-11 xl2tpd[29675]: "passive" 2024-09-08T08:12:01.888245+00:00 ip-172-31-6-11 xl2tpd[29675]: "nodetach" 2024-09-08T08:12:01.888273+00:00 ip-172-31-6-11 xl2tpd[29675]: "192.168.42.1:192.168.42.10" 2024-09-08T08:12:01.888298+00:00 ip-172-31-6-11 xl2tpd[29675]: "refuse-pap" 2024-09-08T08:12:01.888320+00:00 ip-172-31-6-11 xl2tpd[29675]: "auth" 2024-09-08T08:12:01.888342+00:00 ip-172-31-6-11 xl2tpd[29675]: "require-chap" 2024-09-08T08:12:01.888371+00:00 ip-172-31-6-11 xl2tpd[29675]: "name" 2024-09-08T08:12:01.888394+00:00 ip-172-31-6-11 xl2tpd[29675]: "l2tpd" 2024-09-08T08:12:01.888417+00:00 ip-172-31-6-11 xl2tpd[29675]: "file" 2024-09-08T08:12:01.888439+00:00 ip-172-31-6-11 xl2tpd[29675]: "/etc/ppp/options.xl2tpd" 2024-09-08T08:12:01.888462+00:00 ip-172-31-6-11 xl2tpd[29675]: Call established with 119.123.133.169, PID: 29749, Local: 35324, Remote: 1, Serial: 0 2024-09-08T08:12:01.905228+00:00 ip-172-31-6-11 pppd[29749]: Plugin pppol2tp.so loaded. 2024-09-08T08:12:01.905336+00:00 ip-172-31-6-11 pppd[29749]: pppd 2.4.9 started by root, uid 0 2024-09-08T08:12:01.905363+00:00 ip-172-31-6-11 pppd[29749]: Using interface ppp0 2024-09-08T08:12:01.905391+00:00 ip-172-31-6-11 pppd[29749]: Connect: ppp0 <--> 2024-09-08T08:12:01.905420+00:00 ip-172-31-6-11 pppd[29749]: Overriding mtu 1500 to 1280 2024-09-08T08:12:01.905448+00:00 ip-172-31-6-11 pppd[29749]: Overriding mru 1500 to mtu value 1280 2024-09-08T08:12:01.906715+00:00 ip-172-31-6-11 networkd-dispatcher[22530]: WARNING:Unknown index 6 seen, reloading interface list 2024-09-08T08:12:01.915222+00:00 ip-172-31-6-11 systemd[1]: networkd-dispatcher.service: Got notification message from PID 29750, but reception only permitted for main PID 22530 2024-09-08T08:12:01.924655+00:00 ip-172-31-6-11 systemd[1]: networkd-dispatcher.service: Got notification message from PID 29751, but reception only permitted for main PID 22530 2024-09-08T08:12:04.016083+00:00 ip-172-31-6-11 pppd[29749]: Overriding mtu 1400 to 1280 2024-09-08T08:12:04.466335+00:00 ip-172-31-6-11 pppd[29749]: LCP terminated by peer (=M-t:M-j^@<M-Mt^@^@^BM-P) 2024-09-08T08:12:04.466545+00:00 ip-172-31-6-11 pppd[29749]: Overriding mtu 1500 to 1280 2024-09-08T08:12:04.466762+00:00 ip-172-31-6-11 pppd[29749]: Overriding mru 1500 to mtu value 1280 2024-09-08T08:12:04.794902+00:00 ip-172-31-6-11 xl2tpd[29675]: control_finish: Connection closed to 119.123.133.169, serial 0 () 2024-09-08T08:12:04.795022+00:00 ip-172-31-6-11 xl2tpd[29675]: Terminating pppd: sending TERM signal to pid 29749 2024-09-08T08:12:04.795568+00:00 ip-172-31-6-11 pppd[29749]: Terminating on signal 15 2024-09-08T08:12:04.795648+00:00 ip-172-31-6-11 xl2tpd[29675]: control_finish: Connection closed to 119.123.133.169, port 40151 (), Local: 59749, Remote: 6 2024-09-08T08:12:07.469634+00:00 ip-172-31-6-11 pppd[29749]: Connection terminated. 2024-09-08T08:12:07.469721+00:00 ip-172-31-6-11 pppd[29749]: Connect time 0.1 minutes. 2024-09-08T08:12:07.469750+00:00 ip-172-31-6-11 pppd[29749]: Sent 24 bytes, received 0 bytes. 2024-09-08T08:12:07.474724+00:00 ip-172-31-6-11 pppd[29749]: Modem hangup 2024-09-08T08:12:07.474940+00:00 ip-172-31-6-11 pppd[29749]: Exit.

ArcCal commented 1 week ago

This is the answer provided by ChatGPT:The error message WARNING: Unknown index 6 seen, reloading interface list and issues with receiving "out of order control packets" in the logs suggest that there is a potential issue with the network configuration or the handling of the L2TP connection.

Here are some steps you can follow to troubleshoot the issue:

Check Network Interface Configuration: The error in the network dispatcher could be related to a misconfigured network interface. Run the following commands to review your network interfaces:

bash

ip addr ifconfig -a

Look for any unexpected interfaces or conflicts between network interfaces.

Check MTU Settings: The log mentions overriding MTU values. Ensure that your MTU settings are correct for your network. You can try setting a more consistent MTU value across the system:

bash

sudo ip link set dev mtu 1280

Replace with your actual network interface name. The default MTU is 1500, but a value of 1280 is being used here for L2TP.

Networkd-dispatcher Service: The warning about the networkd-dispatcher.service could be due to mismatches in interface states. Restarting the service might help:

bash

sudo systemctl restart networkd-dispatcher

L2TP Configuration: The L2TP logs indicate issues with control packets being out of order and bad control packets. These might result from network instability or a mismatch in the L2TP configuration with the remote server. Ensure the following configurations are correct in the L2TP configuration file (usually located in /etc/xl2tpd/xl2tpd.conf):

Verify the remote server IP is correct.
Ensure the correct tunnel and session IDs are used.

Logs Monitoring: Keep monitoring the logs while making these changes to see if the same errors appear again:

bash

sudo tail -f /var/log/syslog

Check Firewall and Security Groups: If this system is on a cloud provider (e.g., AWS), ensure that security group rules allow L2TP and IPsec traffic (ports 1701, 500, 4500).

Let me know how it goes or if you need further guidance!

hwdsl2 commented 1 week ago

@LedbetterBlog Hello! Thank you for providing the details for this issue. Based on the errors you see in the logs, such as out of order control packet and the warning you mentioned, the VPN connection may be blocked by e.g. the GFW. For these use cases, because IPsec VPN traffic may be blocked, you may want to instead look into alternative solutions, such as Shadowsocks.

LedbetterBlog commented 1 week ago

I think it's also because of the existence of GFW. I used Docker to install it later, but I couldn't connect to the server. All firewalls have been turned off by me, ports are open, and I am unable to access them.