You are not logged in.
Hi
uname: Linux * 5.13.6-arch1-1 #1 SMP PREEMPT Thu, 29 Jul 2021 00:21:06 +0000 x86_64 GNU/Linux
I'm using ocserv (openconnect server), but I found can't listen IPV4 address but only IPV6 when startup pc at first time.
ocserv ver: 1.1.3
lsof -iTCP:1234
ocserv-ma 318 root 7u IPv6 17649 0t0 TCP *:1234(LISTEN)
But after stop and restart service agin (systemctl restart ocserv), IPV4&IPV6 can be on listen both. like this:
ocserv-ma 318 root 3u IPv4 17648 0t0 TCP *:1234(LISTEN)
ocserv-ma 318 root 7u IPv6 17649 0t0 TCP *:1234(LISTEN)
So I think it caused by ipv4 slower than ipv6.I check the systemctl, the ocserv.service is booting with dhcpcd.service at sametime.( use After=network-online.target), the ocserv start listen ip earlier than dhcpcd assgin ipv4 address, at this situation, ipv4 not assgined, ocserv only can listen ipv6 for it. So it can't listen ipv4 at the first startup, but can it listen both after restart ocserv.serivce again.
But when I changed to 5.4.X archlinux and use ocserv 1.0.1, IPV4&IPV6 works well, ocserv.service start listen ip earlier than dhcpcd assgin ipv4 also, but didn't cause this issue.
why? there any issue on kernerl or just ocserv cause it?.
PS1: i know How to sove the issue like add ExecstartPre with sleep 10s or close ipv6 directly.
PS2: can't install ocserv 1.0.1 version on higher ver archlinux or ocserv 1.1.3 on lower ver archlinux.
thanks.
Last edited by dmklight (2021-07-31 11:29:04)
Offline