time syncronisation on boot

Home Page Forums Network Management Signal a BUG time syncronisation on boot

This topic contains 5 replies, has 0 voices, and was last updated by  wilderbeest 7 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #41356

    wilderbeest
    Member

    Hi Everyone,

    not sure if this is a bug ….

    When my Alix / zeroshell router reboots, the date is 1/1/1980. This means that the openVPN connection can’t start up as zeroshell thinks that the certificates aren’t valid yet.

    I have to sync date/time manually through the web interface before the openVPN connection can come up.

    It would be nice if my zeroshell router could reboot without my assistance, e.g. when I’m not at home.

    Best Regards,

    Christian

    #47273

    wilderbeest
    Member

    Yes, I thought of having certificates with a start date before the system time the ALIX comes up with, but I can’t get openssl to generate a start date before the current date…

    Cheers,

    Christian

    #47274

    wilderbeest
    Member

    I found a solution to this problem – I’ve installed ubuntu on a virtual machine using virtualbox, installed openvpn, and set the system date to 1/1/1999 with the command

    date -s 01/01/1999

    Then I set the validity to 10000 days and generate the certificates.

    Now I can power cycle the Alix box and my openvpn tunnel comes back up automatically.

    Cheers,

    Christian

    #47275

    thund3rman
    Member

    As fluvio himself already said somewhere in this forum (I think I’m not mistaken) another solution to that problem is to solder a battery to the alix board (or the battery support as I already did). This way the RTC retains thhe value upon reboot or powerloss…

    The battery placement exists in the board, but most alix vendors don’t assemble a battery support. If you search the board manuals you would find the necessary info.

    Nevertheless, this could be prevented if the network interfaces where brought up before ntp, then ntp and then any certificate dependant service (ow that the date is correctly setup. Don’t know if this is possible though.

    #47276

    schoopy
    Member

    Dear All,

    As ALIX board user I found this quite annoying as well.
    A possible solution is within the boot process to do ntp prior to ntp daemon starts.
    A simple script in /etc/init.d with correct link in /etc/rc3.d would allow such time synchronization right after network is up and before ntp daemon starts. Of course certificates get afterwards.

    Note that new image is necessary for this to hold as /etc/init.d is in RAM and loaded from the Z iso partition.

    Regards,

    Schoopy

    #47277

    mailsvb
    Member

    Hi,

    I had the same problem with my ALIX board… A simple solution for me was to place a command in the POST BOOT SCRIPT


    /etc/init.d/ntp restart

    Maybe this works for you??

    PS: I have a OpenVPN LAN2LAN connection… I never had the problem that it did not come up after reboot.

    #47278

    zgypa
    Member

    This is by far the cleanest option. I followed the POST BOOT advice, and intend to add the battery as well. I was having problems getting a DHCP response from a picky satellite modem when the time was too far out in the past.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.