Page 1 of 1

v1.11 OpenVPN plugin does not work

Posted: Thu Feb 21, 2019 8:16 pm
by pbix
On 8MB Flash routers OpenVPN must be install via plugin. After installing v1.11 on my 1043ND v3 router I inserted a flash drive and made it my plugin root. I then installed the OpenVPN plugin.

However, OpenVPN will not enable. Looking at logread I see:

Code: Select all

hu Feb 21 19:05:59 2019 daemon.err uhttpd[2905]: /tmp/tmp.sh: line 45: /etc/init.d/openvpn: not found
Looking at /etc/init.d I find

Code: Select all

lrwxrwxrwx    1 root     root            31 Feb 21 18:56 openvpn -> /plugin_root/etc/init.d/openvpn
Looking at plugin_root I see

Code: Select all

root@Gargoyle:~# ls -l /plugin_root/etc
drwxrwxrwx    2 root     root         16384 Feb 21 18:56 uci-defaults
root@Gargoyle:~# 
Looks like the OpenVPN plugin does not correctly install to me.

Re: v1.11 OpenVPN plugin does not work

Posted: Thu Feb 21, 2019 9:41 pm
by Lantis
Will look at this in the evening.
EDIT: I need to build a custom firmware to simulate a smaller device (as i don't own any) so it will take a bit of time.

Re: v1.11 OpenVPN plugin does not work

Posted: Fri Feb 22, 2019 9:20 am
by Lantis
Looked into this, have ideas.
By any chance, is the USB flash drive you installed FAT16/32 ??

Re: v1.11 OpenVPN plugin does not work

Posted: Fri Feb 22, 2019 8:33 pm
by pbix
From fsck.fat

Code: Select all

Boot sector contents:
System ID "MSDOS5.0"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
     16384 bytes per cluster
         2 reserved sectors
First FAT starts at byte 1024 (sector 2)
         2 FATs, 16 bit entries
    124416 bytes per FAT (= 243 sectors)
Root directory starts at byte 249856 (sector 488)
       512 root directory entries
Data area starts at byte 266240 (sector 520)
     62126 data clusters (1017872384 bytes)
63 sectors/track, 255 heads
        32 hidden sectors
   1988576 sectors total

Re: v1.11 OpenVPN plugin does not work

Posted: Fri Feb 22, 2019 9:11 pm
by Lantis
Ok. I think the issue is FAT. Are you able to format to EXT4 from within Gargoyle and try again? Should work ok.
I’m tracking the same issue in another thread here;
viewtopic.php?f=6&t=11900

Looks like a simple fix and ongoing sone kind of blocker to prevent.

Re: v1.11 OpenVPN plugin does not work

Posted: Sat Feb 23, 2019 9:20 am
by pbix
Formated my USB stick on my Linux machine and now it seems to be working. I see the below in my file system.

Code: Select all

root@Gargoyle:/etc# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 5632      5632         0 100% /rom
tmpfs                    30060       832     29228   3% /tmp
/dev/mtdblock3             960       508       452  53% /overlay
overlayfs:/overlay         960       508       452  53% /
tmpfs                      512         0       512   0% /dev
/dev/sda1               961272      4712    890512   1% /tmp/usb_mount/a20ddbba-01
root@Gargoyle:/etc# ls -l /tmp/usb_mount/a20ddbba-01/plugin_root
lrwxrwxrwx    1 root     root             4 Feb 23 08:05 etc -> /etc
drwxr-xr-x    3 root     root          4096 Dec 18 05:28 lib
drwxr-xr-x    2 root     root          4096 Feb 23 08:07 sbin
lrwxrwxrwx    1 root     root             4 Feb 23 08:05 tmp -> /tmp
drwxr-xr-x    6 root     root          4096 Jul 22  2018 usr
lrwxrwxrwx    1 root     root             4 Feb 23 08:05 var -> /var
drwxr-xr-x    7 root     root          4096 Feb 23 08:06 www
root@Gargoyle:/etc# ls -l /etc/init.d
-rwxr-xr-x    1 root     root          1122 Feb 15 04:53 boot
-rwxr-xr-x    1 root     root         11774 Feb 15 04:53 bwmon_gargoyle
-rwxr-xr-x    1 root     root           821 Feb 15 04:53 cron
-rwxr-xr-x    1 root     root         28796 Feb 15 04:53 dnsmasq
-rwxr-xr-x    1 root     root           255 Feb 15 04:53 done
-rwxr-xr-x    1 root     root          4973 Feb 15 04:53 dropbear
-rwxr-xr-x    1 root     root           997 Feb 15 04:53 firewall
-rwxr-xr-x    1 root     root           215 Feb 15 04:53 fstab
-rwxr-xr-x    1 root     root          1765 Feb 15 04:53 gargoyle_themes
-rwxr-xr-x    1 root     root          1013 Feb 15 04:53 gpio_switch
-rwxr-xr-x    1 root     root          3364 Feb 15 04:53 led
-rwxr-xr-x    1 root     root          2479 Feb 15 04:53 log
-rwxr-xr-x    1 root     root          2721 Feb 15 04:53 network
-rwxr-xr-x    1 root     root           754 Jul 22  2018 nfsd
-rwxr-xr-x    1 root     root          3448 Jan 30 06:40 openvpn
-rwxr-xr-x    1 root     root           171 Feb 15 04:53 portmap
-rwxr-xr-x    1 root     root         28297 Feb 15 04:53 qos_gargoyle
-rwxr-xr-x    1 root     root          2315 Feb 15 04:53 relayd
-rwxr-xr-x    1 root     root          2892 Dec 18 05:28 samba
-rwxr-xr-x    1 root     root           565 Feb 15 04:53 set_kernel_timezone
-rwxr-xr-x    1 root     root          4060 Feb 15 04:53 share_users
-rwxr-xr-x    1 root     root          1212 Feb 15 04:53 sysctl
-rwxr-xr-x    1 root     root           662 Feb 15 04:53 sysfixtime
-rwxr-xr-x    1 root     root          2155 Feb 15 04:53 sysntpd
-rwxr-xr-x    1 root     root          1047 Feb 15 04:53 system
-rwxr-xr-x    1 root     root          5219 Feb 15 04:53 uhttpd
-rwxr-xr-x    1 root     root           106 Feb 15 04:53 umount
-rwxr-xr-x    1 root     root           239 Feb 15 04:53 urandom_seed
-rwxr-xr-x    1 root     root          7574 Feb 15 04:53 usb_storage
-rwxr-xr-x    1 root     root           188 Feb 15 04:53 usbmode
-rwxr-xr-x    1 root     root          8282 Feb 15 04:53 vsftpd
-rwxr-xr-x    1 root     root          3994 Feb 15 04:53 webmon_gargoyle
What ever links are used don't look the same as when it was FAT32. Not a file system guru so not sure what the issue is.

Anyway thanks for your help on this.

Re: v1.11 OpenVPN plugin does not work

Posted: Sat Feb 23, 2019 7:00 pm
by Lantis
All good :)
I’m not a guru either. I did implement my own FAT file system as part of an assignment at university but it was only very simple. The concept of symlinks was never a criteria ;)