Scheduling OpenVPN Server Startup

Discussion in 'Tomato Firmware' started by maple.chick, Sep 20, 2011.

  1. maple.chick

    maple.chick Networkin' Nut Member

    I want to start OpenVPN server at specific times so I have a few questions in regards to that.

    1. What command does TomatoUSB uses to start OpenVPN server, the command I see in 'top' comes out as:
    --/etc/openvpn/vpnserver1 --cd /etc/openvpn/server1 --config config.ovpn
    However, I am only able to start OpenVPN server with:
    openvpn --cd /etc/openvpn/server1 --config config.ovpn
    When I use TomatoUSB parameters, as shown in 'top', to start OpenVPN, I get an error saying 'unrecognized option'. So my question is how does TomatoUSB start OpenVPN? Is there a script? I tried looking through the code but I couldn't find anything.

    2. WMM setting: I am not entirely sure what this does but when I was testing TomatoRAF, this setting was disabled, I am using TomatoUSB. Should I leave it ON or disable it?

    Above all, I want to thank all the developers for their hard work! I have a request our kind developers if they would consider getting rid of a few themes in favor of more functionality. Case in point, TomatoRAF, Shibby, Toastman builds. The USB+VPN versions, 3.8MB+, are too big for WRT54G v1-4. I can flash 3.65MB firmwares but every time I try to flash TomatoRAF, Shibby or Toastman USB+VPN build, I get an error saying the firmware is too big.

    Thank you.
  2. EOC_Jason

    EOC_Jason Networkin' Nut Member

    /etc/openvpn/vpnserver1 is merely symlinked to /usr/sbin/openvpn

    The OpenVPN config files are generated by the GUI only when the server / client is running. If it stops then it deletes the files and cleans things up. So if you want to bypass the GUI then you will have to copy all the files to your jffs or a usb partition.

    2: WMM:

    By default it's ON (at least with the Toastman builds)... and as a general rule of thumb, if you don't know what a setting is, leave it at the default setting!
    maple.chick likes this.
  3. Toastman

    Toastman Super Moderator Staff Member Member

    I never really know what to think about WMM, whether it does anything useful or not. And if I can't tell, then it probably doesn't. I do know that the power saving extensions (APSD) can cause problems with dropped connections and poor throughput. However, WMM is necessary to get fully functional wireless N. But if I had an earlier G only router, I would turn it off.
    maple.chick likes this.
  4. maple.chick

    maple.chick Networkin' Nut Member

    @EOC_Jason, Thank for that. I was able to get OpenVPN server working with scheduler but if I reboot my router the extra cron/cru schedules I have, are deleted. So how do I make these schedules permanent?

    @Toastman, Thank you so much for that tip. I've been having too many dropped connections as of late so I guess ASPD must be it.

    Also any hope for VPN+USB builds on WRT54G? I get an error saying "File is too big to fit in MTD" on 3.85mb builds even though the flash is 4mb. Perhaps I am doing something wrong. :(
  5. EOC_Jason

    EOC_Jason Networkin' Nut Member

    A WRT54G doesn't have a USB port though.... The most I've seen people do is mod a SD card via GPIO pins?

    Did you manually enter in the cron jobs at the shell, or did you do them via the GUI?
  6. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    Put your cron jobs in the router's init script.

    To start the server using the GUI-configured settings, the command should be
    service vpnserver1 start

    no need to copy anything to jffs/cifs/usb.
    maple.chick likes this.
  7. maple.chick

    maple.chick Networkin' Nut Member

    I use the USB version for File Sharing feature specifically for 'Samba File Sharing', it makes browsing the network considerably fast.

    Thank you so much, SgtPepperKSU. That's a wonderful tip.

    Anyhow, I managed to kill my router. I guess I simply can't be trusted with electronics. :D

    Thank you all for your time and help.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice