Code Monkey home page Code Monkey logo

freenas-transmission-openvpn's People

Contributors

amussey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

freenas-transmission-openvpn's Issues

OpenVPN Errors in FreeNAS 9.10.

Hello,

Love the work, so thank you! However, I'm having an issue getting OpenVPN to successfully start (error from jail /var/log/messages below) and I was hoping someone here may be able to help point me in the right direction. Any ideas what might be going on?

Also, OpenVPN fails earlier unless I create the "tun" interface (using 'ifconfig tun create') on the host. I doubt this is expected as I don't see it mentioned in the instructions.

Sat Jul 23 18:18:17 2016 OpenVPN 2.3.11 amd64-portbld-freebsd9.3 [SSL (OpenSSL)] [LZO] [MH] [IPv6] built on Jun 6 2016
Sat Jul 23 18:18:17 2016 library versions: OpenSSL 0.9.8za-freebsd 5 Jun 2014, LZO 2.09
Sat Jul 23 18:18:17 2016 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Sat Jul 23 18:18:17 2016 Control Channel Authentication: tls-auth using INLINE static key file
Sat Jul 23 18:18:17 2016 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Jul 23 18:18:17 2016 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Jul 23 18:18:17 2016 Socket Buffers: R=[42080->524288] S=[9216->524288]
Sat Jul 23 18:18:17 2016 UDPv4 link local: [undef]
Sat Jul 23 18:18:17 2016 UDPv4 link remote: [AF_INET]XX.XX.XX.XX:1195
Sat Jul 23 18:18:17 2016 TLS: Initial packet from [AF_INET]XX.XX.XX.XX:1195, sid=1fd8b08c 3c11b001
Sat Jul 23 18:18:18 2016 VERIFY OK: depth=1, C=VG, ST=BVI, O=ExpressVPN, OU=ExpressVPN, CN=ExpressVPN CA, emailAddress=[email protected]
Sat Jul 23 18:18:18 2016 VERIFY OK: nsCertType=SERVER
Sat Jul 23 18:18:18 2016 VERIFY X509NAME OK: C=VG, ST=BVI, O=ExpressVPN, OU=ExpressVPN, CN=Server, emailAddress=[email protected]
Sat Jul 23 18:18:18 2016 VERIFY OK: depth=0, C=VG, ST=BVI, O=ExpressVPN, OU=ExpressVPN, CN=Server, emailAddress=[email protected]
Sat Jul 23 18:18:18 2016 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Sat Jul 23 18:18:18 2016 Data Channel Encrypt: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Jul 23 18:18:18 2016 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Sat Jul 23 18:18:18 2016 Data Channel Decrypt: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Jul 23 18:18:18 2016 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Sat Jul 23 18:18:18 2016 [Server] Peer Connection Initiated with [AF_INET]XX.XX.XX.XX:1195
Sat Jul 23 18:18:20 2016 SENT CONTROL [Server]: 'PUSH_REQUEST' (status=1)
Sat Jul 23 18:18:20 2016 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 10.13.0.1,route 10.13.0.1,topology net30,ping 10,ping-restart 60,ifconfig 10.13.3.138 10.13.3.137'
Sat Jul 23 18:18:20 2016 OPTIONS IMPORT: timers and/or timeouts modified
Sat Jul 23 18:18:20 2016 OPTIONS IMPORT: --ifconfig/up options modified
Sat Jul 23 18:18:20 2016 OPTIONS IMPORT: route options modified
Sat Jul 23 18:18:20 2016 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Jul 23 18:18:20 2016 Could not retrieve default gateway from route socket:: No such process (errno=3)
Sat Jul 23 18:18:20 2016 ROUTE: default_gateway=UNDEF
Sat Jul 23 18:18:20 2016 Cannot allocate TUN/TAP dev dynamically
Sat Jul 23 18:18:20 2016 Exiting due to fatal error

Verify that it works

Hey there, thanks for this project! Very easy to setup!

I have but one question: how do I verify that my VPN-connection works and all traffic gets routed through there? There is no way to see something like the external IP in the transmission web interface. The only indication I have is that my listening port is now shown as closed.

Kind regards

OpenVPN looses connection

Hey, thank you for your work!
From time to time i have the problem that the VPN connection fails, what is pretty bad.
The lasttime the transmission jail went to an off state.
It is possible to only allow the connection via VPN?

Trouble with nordvpn setup

i am a bit out of my depth here with unix -related things even, but here goes:
i followed your guide to the word until the config part. Nordvpn offers .ovpn file that has a bit different certificate from airvpn.
when running the script i get an error:

`
root@transmission:/tmp/openvpn # /etc/rc.d/transmissionvpn start
spawn /usr/local/sbin/openvpn --cd /FreeNAS-Transmission-OpenVPN/openvpn --config /FreeNAS-Transmission-OpenVPN/openvpn/openvpn.conf --up /FreeNAS-Transmission-OpenVPN/scripts/start_transmission.sh --script-security 2 --down /FreeNAS-Transmission-OpenVPN/scripts/stop_transmission.sh --daemon openvpn --log-append /FreeNAS-Transmission-OpenVPN/openvpn-running.log --writepid /FreeNAS-Transmission-OpenVPN/openvpn.pid
expect: spawn id exp4 not open
while executing
"expect "Enter Auth Password:" {
send "passwordPassword\n"
}"
(file "/FreeNAS-Transmission-OpenVPN/run.sh" line 16)

`

this is how my .ovpn file looks like:

`client
dev tun
proto udp
remote 196.196.203.69 1194
resolv-retry infinite
remote-random
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ping 15
ping-restart 0
ping-timer-rem
reneg-sec 0
comp-lzo no

remote-cert-tls server

auth-user-pass
verb 3
pull
fast-io
cipher AES-256-CBC
auth SHA512

-----BEGIN CERTIFICATE----- MIIFCjCCAvKgAwIBAgIBATANBgkqhkiG9w0BAQ0FADA5MQswCQYDVQQGEwJQQTEQ MA4GA1UECh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5rmVg/ k6a10rlsbK/eg//GHoJxDdXDOokLUSnxt7gk3QKpX6eCdh67p0PuWm/7WUJQxH2S DxsT9vB/iZriTIEe/ILoOQF0Aqp7AgNCcLcLAmbxXQkXYCCSB35Vp06u+eTWjG0/ pyS5V14stGtw+fA0DJp5ZJV4eqJ5LqxMlYvEZ/qKTEdoCeaXv2QEmN6dVqjDoTAo k0t5u4YRXzEVCfXAC3ocplNdtCA72wjFJcSbfif4BSC8bDACTXtnPC7nD0VndZLp +RiNLeiENhk0oTC+UVdSc+n2nJOzkCK0vYu0Ads4JGIB7g8IB3z2t9ICmsWrgnhd NdcOe15BincrGA8avQ1cWXsfIKEjbrnEuEk9b5jel6NfHtPKoHc9mDpRdNPISeVa wDBM1mJChneHt59Nh8Gah74+TM1jBsw4fhJPvoc7Atcg740JErb904mZfkIEmojC VPhBHVQ9LHBAdM8qFI2kRK0IynOmAZhexlP/aT/kpEsEPyaZQlnBn3An1CRz8h0S PApL8PytggYKeQmRhl499+6jLxcZ2IegLfqq41dzIjwHwTMplg+1pKIOVojpWA== -----END CERTIFICATE----- key-direction 1 # # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- e685bdaf659a25a200e2b9e39e51ff03 0fc72cf1ce07232bd8b2be5e6c670143 f51e937e670eee09d4f2ea5a6e4e6996 5db852c275351b86fc4ca892d78ae002 d6f70d029bd79c4d1c26cf14e9588033 cf639f8a74809f29f72b9d58f9b8f5fe fc7938eade40e9fed6cb92184abb2cc1 0eb1a296df243b251df0643d53724cdb 5a92a1d6cb817804c4a9319b57d53be5 80815bcfcb2df55018cc83fc43bc7ff8 2d51f9b88364776ee9d12fc85cc7ea5b 9741c4f598c485316db066d52db4540e 212e1518a9bd4828219e24b20d88f598 a196c9de96012090e333519ae18d3509 9427e7b372d348d352dc4c85e18cd4b9 3f8a56ddb2e64eb67adfc9b337157ff4 -----END OpenVPN Static key V1----- `

No buffer space available error

Sorry for bothering you again.
I got an Error when the jail had a bit of traffic.

found a few threads and edited the sysctl config file via ssh.

https://forums.freenas.org/index.php?threads/transmission-error-udp-failed-to-set-receive-buffer-please-help.15203/

I have done the changes on my sysctl in the root directory, but then i couldn't boot anymore.

there is another way but all the things i found where for the old FreeNAS build or plain BSD:

net.inet.tcp.recvbuf_max
net.inet.tcp.sendbuf_max

Do you know how to get rid of it?

Thanks as always for your great work. Maybe i will contribute a few lines of code for stability and the ipfw feature in the next month when there is time.

OpenVPN not starting.

Hi, first off thanks for the work just what i was searching for.

Now my Problem is this, if i follow your instructions and disable my transmission plugin i first lose connection to the remote interface, okay fine.
When i then get to the end of your script the Plugin is still disabled because of this i get no connection.

If i then turn the plugin ON again i feel like its killing your transmission session and OpenVPN still does not open up any connection.

Any idear what this could be? I'm also on 9.3

Error in FreeNAS 9.10

Everything went well up until the configuration are. Got the config file downloaded and it unzipped fine but when applying the line mv Sweden.ovpn openvpn.conf (I use mv US Texas.ovpn openvpn.conf) I get the error mv: openvpn.conf is not a directory. I am pretty new to this process, I imagine it is an easy fix but could you walk me through it?

Here are the exact lines I get:
root@transmission_1:/FreeNAS-Transmission-OpenVPN/openvpn # mv US Texas.ovpn ope
nvpn.conf
mv: openvpn.conf is not a directory
root@transmission_1:/FreeNAS-Transmission-OpenVPN/openvpn #

Cannot reach host with VPN up

So for whatever reason this jail was reachable but now I cannot access the transmission URL if the VPN is up. Is there some type of firewall setting to enable traffic to that jail once the VPN is up?

expect: spawn id exp6 not open

transmissionvpn start is failing during the expect script. I'm receiving the error "expect: spawn id exp6 not open". After doing quite a bit of research I believe this is occurring because openvpn is closing stdin. If I remove the --daemon arg from the spawn command, the error goes away, and the script works when manually run from the shell. However, it fails to run correctly as a service.

Any assistance you can provide to help get past this issue?

Thanks!

What exactly do these scripts do?

The descriptions reads:

This guide and the associated scripts will help you secure your Transmission client so it only sends traffic through a VPN.

HOW does it do this?

I see the usage of /etc/rc.d/transmissionvpn start / stop

what does that script do? I see it sets some IP, can you elaborate?
What is different here from simply setting up OpenVPn and transmission without this script?

Auto-start + kill-switch

Can you include the step for the following in your readMe please:

  1. Auto-start openvpn on jail/plugin start (unless that's already the case? the script and guide are ambiguous)
  2. Kill-switch setup (so transmission loses network connection if open vpn drops)
  3. Steps to change the openvpn server country
  4. Is there a way to test that the vpn is working?

Thanks so much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.