1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

OpenVPN client static IP assignment

Discussion in 'Tomato Firmware' started by gn3t00r, Aug 9, 2009.

  1. gn3t00r

    gn3t00r Addicted to LI Member

    [Workarounded] OpenVPN client static IP assignment

    Hi,

    I know in regular openvpn setup, you can use client-config-dir directive with file (where filename is the same as common name in the certificate) to specify static IP for specific common name. How do I do it via Web GUI in TomatoVPN? Is it possible? I am using version 1.25. Thanks in advance.
     
  2. gawd0wns

    gawd0wns LI Guru Member

    I know that if you have a TAP setup, a MAC address will appear when your client connects. You can simply create a static dhcp entry in that case. I don't know about TUN all that much...Though the client-config-dir directive works. You just have to enable jffs2 and save it in /jffs so it doesn't get erased after a reboot.
     
  3. gn3t00r

    gn3t00r Addicted to LI Member

    Ok. Just figure it out. It can't be done via the Web GUI directly. The Web GUI only supports iproute but not ifconfig-push under the Advanced tab of the OpenVPN Server configuration.

    Say I want to assign static ip 10.251.251.10 to common name sc02 in my Server2 settings. I will do the following:

    Goto Administration->Scripts
    Select Firewall tab

    Code:
    mkdir -p /etc/openvpn/server2/ccd/
    echo "ifconfig-push 10.251.251.8 10.251.251.9" > /etc/openvpn/server2/ccd/sc02
    Save and Reboot

    May be for next version of the TomatoVPN Web GUI, we can add support for ifconfig-push for client side static IP assignment. :D

    Anyway, 1.25 is really good. Loving it every minutes.
     

Share This Page