VPN client with OMV + transmission

  • Ifit - have you checked your port forwarding? You may need to forward the VPN port through your local router and you may also need to forward the transmission port through your VPN service. I use proxy.sh, they have a dashboard which I have to forward the transmission port through to ensure its all open.


    If you look in the logfile in the OMV interface, does it show that the VPN connection is initiated? It should also show the ip that the VPN is connected on?

  • I replace this for my config:


    script1 (/usr/bin/vpn-config.sh):


    VPNUSER="vpnuser" replace by => "debian-transmission"
    LANIP="192.168.1.0/24" i don't replace this , i should ? ( my NAS IP is static 192.168.1.99)
    export NETIF="br0" replace by => "eth1"


    script2 (/etc/openvpn/up-vpn.sh) :


    VPNUSER="vpnuser" replace by "debian-transmission"


    route ip :


    200 vpnuser replace by 114 debian-transmission


    ipv4.conf (/etc/sysctl.d/99-openmediavault.conf):


    net.ipv4.conf.all.rp_filter = 0
    net.ipv4.conf.default.rp_filter = 0
    net.ipv4.conf.br0.rp_filter = 0


    OpenVpn conf (/etc/openvpn/Netherlands.conf) :


    I have rename my .ovpn by .conf and do a pass file for auto auth.


    client
    dev tun
    proto udp
    remote nl.privateinternetaccess.com 1194
    resolv-retry infinite
    nobind
    route-nopull
    script-security 2
    up /etc/openvpn/up-vpn.sh
    persist-key
    persist-tun
    ca ca.crt
    tls-client
    remote-cert-tls server
    auth-user-pass pass
    comp-lzo
    verb 1
    reneg-sec 0

  • How is script 1 called? Your vpn conf only appears to call script2?
    Shouldnt it be;

    Code
    route-up /usr/bin/vpn-config.sh


    and then at the end of script 1 include a line;

    Code
    /etc/openvpn/up-vpn.sh


    to execute the second script?


    On my machine its eth0, I assume you are confident its eth1. Your LANIP looks ok to me.


    Have you confirmed from the logs that the vpn link is up? Whenever I have had problems with "cannot connect to tracker" it has usually been port forwarding.


    What is the output of;

    Code
    iptables -S
    route -n
  • actually i run script1 manually.


    script1 is from this of tuto:


    Then i run my openvpn by /etc/init.d/openvpn restart
    so script 2 is run auto with up command.


    For eth0 my interface is eth1 on OMV WebUi, i think is the static IP config because i see eth1 config in /etc/network/interfaces


    I will post route on next post

  • iptables -S




    route -n



    Code
    10.176.1.5      0.0.0.0           255.255.255.255  UH   0  0  0   0  tun0
    192.168.1.0    0.0.0.0           255.255.255.0      U     0  0  0   0  eth1
    0.0.0.0           192.168.1.1    0.0.0.0                UG   0  0  0   0  eth1
  • You have about reached the limit of linux ability to help . . .


    You have not confirmed that you have the line;

    Code
    Wed Mar 26 17:38:21 2014 Initialization Sequence Completed


    in your syslog, confirming that the vpn tunnel is up correctly, but I assume you have this.


    The output of iptables –S matches mine.
    My output of route –n is;

    Code
    0.0.0.0         192.168.2.1     0.0.0.0         UG    0      0        0 eth0
    10.10.0.73      0.0.0.0         255.255.255.255 UH    0      0        0 tun0
    192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0


    Which is similar to yours except the order. Something is telling me the table is read sequentially though??? Someone who knows more than I may know if this has an influence.


    I am still thinking that it may be a port forwarding issue. Have you seen this;
    https://www.privateinternetacc…ication-advanced-users/p1

  • I have : Initialization Sequence Completed when i start openvpn
    Thanks for API , i don't see that i need send request for port forwarding to provider.


    At the moment i try to use curl request but i get a certif error ( but my script run in /etc/openvpn/ and ca.cert is in this )

  • Ok i have write a script with curl request.


    I get : "{port forwarding not avaible for this region.}"


    In forum they say : "Please make sure that the HTTPS call is routed out over the OpenVPN tunnel, if you're utilizing a setup where not all traffic is routed, you will need to write your code to properly route the call over the tunnel!"


    How can i route this request over my VPN ( edit iproute script? ) ?



    script curl (/etc/openvpn/PortForwarding.sh):

    Code
    address=$(ifconfig tun0|grep -oE "inet addr: *10\.[0-9]+\.[0-9]+\.[0-9]+"|tr -d "a-z :"|tee)
    #This grabs the port number freed up for the tunnel
    #Things to change: USERNAME, PASSWORD, CLIENT_ID
    curl -k -d "user=USERNAME&pass=PASSWORD&client_id=CLIENT_ID&local_ip=$address" https://www.privateinternetaccess.com/vpninfo/port_forward_assignment
  • I would raise a ticket with them . . .. you are paying them for their service after all. From what I saw on there website last night the port forwarding was only available in certain regions, I thought the Netherlands was one of those regions though??


    Maybe you could also trial on another service - I think proxy.sh has a $2 (us) service that you can use for a day as testing. Maybe you can find another site that has a free trial?

  • I think it's just a route problem on my NAS, because a guy have the same problem and post this:


    @VPN: solved it ... the https request was not going via the VPN tunnel.
    Could you please mention that aspect clearly in the 1st post? i.e. that the https request needs to be routed via the PIA VPN or else you get this error.


    cf : https://www.privateinternetacc…ication-advanced-users/p4



    I just need toi know how i can route my curl request in the VPN.

  • Now i get my port number via curl request, i use this for update transmission:

    Code
    transmission-remote --auth=LOGIN:PASS -p $port


    Command is succefull , but my torrent doesn't work.
    I think i need update json conf file of transmission and update the new port "peer-port"


    I try "sed" command for replace

    Code
    "peer-port": 59560


    by my new port. But it doesn't work.
    Can you help me for "sed" command or anything for edit my json file ?


    Thanks

  • editing the .json file should be simple. I do not know the location as I do not have it installed but you can find it and edit it as such;


    Code
    cd /
    find -name *.json


    this will show you the location of the file;

    Code
    nano /"enter file location here


    you can then edit the port number and and save the file. You will need to have nano installed, if not you may use vi or any other similar editor.

  • Debian (which OpenMediaVault is based on) comes with nano preinstalled. ;)


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • I have a good network config now , VPN for my transmission service and all other with eth1.


    I get the port forwarding with provider API (curl request , cf page 2), then i update my transmission port with:
    - transmission-remote $port
    - update "peer-port" of json ( /etc/transmission-daemon/settings.json)
    -restart transmission daemon


    Now i have 2 problems (again ...):
    1) transmission logs : "could not connect to tracker" (/var/log/transmission-daemon )
    2) my transmission WebUI don't take the good "peer-port" after update by my script. But when i "netstat -lptn" transmission listen on the good port.


    ps : i use this post for network config (french) https://tech.kanka.ch/index.ph…pn-sur-un-serveur-debian/

  • I came up with another solution since I'm using a VPN connection to the outside world. I ran also into the remote acces problem.


    But, I have Tomtato RAF firmware installed on my router so I setted up a VPN server on the router and when I must use remote acces I simply setup a VPN connection to the router and can do everything like before. Even more, I can also acces my homegroup so it's very simple to copy and move from and to remote locations.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!