StreisandEffect / streisand

Streisand sets up a new server running your choice of WireGuard, OpenConnect, OpenSSH, OpenVPN, Shadowsocks, sslh, Stunnel, or a Tor bridge. It also generates custom instructions for all of these services. At the end of the run you are given an HTML file with instructions that can be shared with friends, family members, and fellow activists.
https://twitter.com/streisandvpn
Other
23.19k stars 1.99k forks source link

Adding routes fail on Ubuntu Server #1519

Open ericswpark opened 5 years ago

ericswpark commented 5 years ago

Expected behavior: OpenVPN connects and Internet works

Actual Behavior: OpenVPN connects but Internet does not work

Steps to Reproduce:

  1. Connect with direct or SSL.
  2. OpenVPN throws this warning (error?)
    Feb 22 21:11:21 vpn-passthrough openvpn[15745]: RTNETLINK answers: File exists
    Feb 22 21:11:21 vpn-passthrough ovpn-streisand-direct[15745]: ERROR: Linux route
    add command failed: external program exited with error status: 2
    Feb 22 21:11:21 vpn-passthrough ovpn-streisand-direct[15745]: /sbin/ip route add
    10.8.0.0/24 via 10.8.0.5
  3. VPN connects, BUT Internet does not work. Confirmed by pinging 8.8.8.8.

streisand-diagnostics.md

### Ansible Information

* Ansible version: 2.6.5
* Ansible system: Linux
* Host OS: Ubuntu
* Host OS version:  18.04
* Python interpreter: python
* Python version: 2.7.15rc1

### Streisand Information

* Streisand Git revision: dc37b89d1c119e7c57d3812d109cb146ad508434
* Streisand Git clone has untracked changes: no
* Genesis role: genesis-digitalocean
* Custom SSH key: False

### Enabled Roles

* Shadowsocks enabled:  True
* Wireguard enabled: True
* OpenVPN enabled: True
* stunnel enabled: True
* Tor enabled: False
* Openconnect enabled: True
* TinyProxy enabled: True
* SSH forward user enabled: True
* Configured number of VPN clients: 5
antmak commented 5 years ago

VPN connects, BUT Internet does not work. Confirmed by pinging 8.8.8.8.

yes, the same

JamesHagerman commented 5 years ago

I believe this is due to a conflicting route in the *.opvn file. I reference a fix here: https://github.com/StreisandEffect/streisand/issues/1514#issuecomment-502395488

tl;dr: Comment out the offending route in the *.opvn file using a ; and try again.

I don't know enough about how openvpn usually adjusts routes when it's started, so I can't really dig much deeper.

It would be nice to fix this in Streisand's configs if possible though...