idlab-discover / easy-openvpn-server

Plug-and-play OpenVPN server which generates server and client config files for you
https://snapcraft.io/easy-openvpn-server
GNU Affero General Public License v3.0
65 stars 9 forks source link

IPV4 failback fail in ubuntu #4

Open aladedragon opened 3 years ago

aladedragon commented 3 years ago

Hello I just installed and update a fresh ubuntu Focal 20.04 and deplyed this snap. 20.04.1-Ubuntu SMP Fri Jul 16 01:02:14 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

My system has no ipv6, noe ipv6 config so no way to configure nothing it:

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 02:00:17:06:52:e6 brd ff:ff:ff:ff:ff:ff
    altname enp0s3
    inet 10.0.10.82/24 brd 10.0.10.255 scope global ens3
       valid_lft forever preferred_lft forever

after installation I have entered a commad to be sure ipv4 Ip is considered as external IP snap set easy-openvpn-server public-address=10.0.10.82

Openvpn refuses to boot, since I don't know where is the config file I can't debug it much more. first time snaping apps so any help is most tham welcome.

For the moment:

 snap logs easy-openvpn-server

2021-07-23T15:38:16Z easy-openvpn-server.tcp-server[1231]: ip6tables v1.6.1: can't initialize ip6tables table `nat': Address family not supported by protocol
2021-07-23T15:38:16Z easy-openvpn-server.tcp-server[1231]: Perhaps ip6tables or your kernel needs to be upgraded.
2021-07-23T15:38:16Z systemd[1]: snap.easy-openvpn-server.tcp-server.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
2021-07-23T15:38:16Z systemd[1]: snap.easy-openvpn-server.tcp-server.service: Failed with result 'exit-code'.
2021-07-23T15:38:16Z systemd[1]: snap.easy-openvpn-server.tcp-server.service: Scheduled restart job, restart counter is at 6.
2021-07-23T15:38:16Z systemd[1]: Stopped Service for snap application easy-openvpn-server.tcp-server.
2021-07-23T15:38:16Z systemd[1]: snap.easy-openvpn-server.tcp-server.service: Start request repeated too quickly.
2021-07-23T15:38:16Z systemd[1]: snap.easy-openvpn-server.tcp-server.service: Failed with result 'exit-code'.
2021-07-23T15:38:16Z systemd[1]: Failed to start Service for snap application easy-openvpn-server.tcp-server.
aladedragon commented 3 years ago

Maybe the problem is arround this part of the code:

https://github.com/IBCNServices/easy-openvpn-server/blob/master/scripts/setup.py 'protocol': "tcp6-server",

merlijn-sebrechts commented 3 years ago

@aladedragon

Can you show the output of cat /sys/module/ipv6/parameters/disable on your system?

merlijn-sebrechts commented 3 years ago

For future reference, I started a discussion about allowing snaps to see if ipv6 support is enabled here: https://forum.snapcraft.io/t/allow-access-to-check-if-ipv6-is-enabled/25799

merlijn-sebrechts commented 3 years ago

@aladedragon

Can you also show the output of ip -6 address show on your system?

3v1n0 commented 2 years ago

Similar setup, my address configuration is:

❯ ip -6 address show
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fdba:29be:af89:0:dea6:32ff:fe70:541c/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fdba:29be:af89::ad0/128 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fdba:29be:af89:0:9b9b:5271:5d1e:de03/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::dea6:32ff:fe70:541c/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Same issue on restarting

merlijn-sebrechts commented 2 years ago

@3v1n0 Can you also show the output of cat /sys/module/ipv6/parameters/disable and snap logs easy-openvpn-server?

merlijn-sebrechts commented 2 years ago

For anyone having this issue, please show the output of the following commands:

cat /sys/module/ipv6/parameters/disable
snap logs easy-openvpn-server
ip -6 address show

I haven't yet found a reliable way to check if IPv6 is disabled.

bangell commented 2 years ago

at first cat /sys/module/ipv6/parameters/disable was always 0 for me. I turned off ipv6 using sysctl.conf with the 3 parameters net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6 = 1

i could cat those after reboot and looked good, but /sys/module/ipv6/parameters/disable was still 0.

I finally added disable_ipv6=1 to the boot command and /sys/module/ipv6/parameters/disable is now 1.

Hope this helps

bangell commented 2 years ago

ok now i get a weird error:

$cat /sys/module/ipv6/parameters/disable 1 $sudo snap logs easy-openvpn-server 2021-10-12T03:31:31Z easy-openvpn-server.udp-server[1554]: ipv6 network: fddc:883b:18dc:352e::/64 2021-10-12T03:31:31Z easy-openvpn-server.udp-server[1580]: ip6tables v1.6.1: can't initialize ip6tables table `nat': Address family not supported by protocol 2021-10-12T03:31:31Z easy-openvpn-server.udp-server[1580]: Perhaps ip6tables or your kernel needs to be upgraded. 2021-10-12T03:31:31Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED 2021-10-12T03:31:31Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Failed with result 'exit-code'. 2021-10-12T03:31:32Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Scheduled restart job, restart counter is at 6. 2021-10-12T03:31:32Z systemd[1]: Stopped Service for snap application easy-openvpn-server.udp-server. 2021-10-12T03:31:32Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Start request repeated too quickly. 2021-10-12T03:31:32Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Failed with result 'exit-code'. 2021-10-12T03:31:32Z systemd[1]: Failed to start Service for snap application easy-openvpn-server.udp-server.

$ip -6 address show

(nothing)

Any ideas?

techwavese commented 10 months ago

Same problem here.

I have no ipv6 address whatsoever.

Why not just have an option to disable the ipv6 setup part?

merlijn-sebrechts commented 10 months ago

If the tool can detect the absence of ipv6, it should just disable this functionality without the user telling them to.

But I need your output to the above commands (https://github.com/idlab-discover/easy-openvpn-server/issues/4#issuecomment-939954218) to be able to know how to detect the absence of ipv6

JakeyPrime commented 5 months ago

For anyone having this issue, please show the output of the following commands:

cat /sys/module/ipv6/parameters/disable

1

snap logs easy-openvpn-server

2024-02-27T02:20:15Z easy-openvpn-server.udp-server[1834]: ipv6 network: fdb4:da35:5d88:aa45::/64
2024-02-27T02:20:15Z easy-openvpn-server.udp-server[1863]: ip6tables v1.6.1: can't initialize ip6tables table `nat': Address family not supported by protocol
2024-02-27T02:20:15Z easy-openvpn-server.udp-server[1863]: Perhaps ip6tables or your kernel needs to be upgraded.
2024-02-27T02:20:15Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
2024-02-27T02:20:15Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Failed with result 'exit-code'.
2024-02-27T02:20:15Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Scheduled restart job, restart counter is at 5.
2024-02-27T02:20:15Z systemd[1]: Stopped Service for snap application easy-openvpn-server.udp-server.
2024-02-27T02:20:15Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Start request repeated too quickly.
2024-02-27T02:20:15Z systemd[1]: snap.easy-openvpn-server.udp-server.service: Failed with result 'exit-code'.
2024-02-27T02:20:15Z systemd[1]: Failed to start Service for snap application easy-openvpn-server.udp-server.

ip -6 address show

Empty output

I haven't yet found a reliable way to check if IPv6 is disabled.

Seems it grabbed a local ipv6(?) address and is running with it. Disabled IPV6 and rebooted and it refuses to change. I don't even really care if the snap doesn't auto detect no ipv6, I just need instructions to completely disable it.

It's killed 2 VPN setups using this Snap.