vpn-ws icon indicating copy to clipboard operation
vpn-ws copied to clipboard

Apache2 and uWSGI

Open brenard opened this issue 9 years ago • 3 comments

Hello,

I try to install vpn-ws server using Apache2 (on Debian Jessie) but it's does not work. But with the same client and the same server using Nginx it's work like a charm. On Apache, I'm using mod_uswgi with a simple configuration :

<Location /vpn>
    SetHandler uwsgi-handler
    uWSGISocket 127.0.0.1:5235
</Location>

With this configuration, my client can connect to the server :

brenard@aconit:~/dev/vpn-ws$ ((detached from v0.2)) sudo ./vpn-ws-client --exec "ifconfig vpn0 172.16.0.2 netmask 255.255.255.0; ip link set mtu 1490 dev vpn0; ifconfig vpn0 up" vpn0 ws://vpn-ws.zionetrix.net:80/vpn --no-verify
[Fri Nov 27 20:24:53 2015] connecting to vpn-ws.zionetrix.net port 80 (transport: ws)
[Fri Nov 27 20:24:53 2015] connected to vpn-ws.zionetrix.net port 80 (transport: ws)

And my server see this new client :

root@gaston:~$ ./vpn-ws --tuntap vpn0 127.0.0.1:5235 --exec 'ifconfig vpn0 172.16.0.1 netmask 255.255.255.0; ip link set mtu 1490 dev vpn0; ifconfig vpn0 up'
[Fri Nov 27 20:24:53 2015] registered new peer 8 MAC=02:76:4A:0B:B4:D3 REMOTE_ADDR=109.190.110.196 REMOTE_USER= DN=

But a ping between to host does work. A tcpdump on vpn0 show that ARP request does not get reply.

Do you have an idea what could be the problem ? Do you have an example of functional configuration with apache ? I also try with mod_proxy_uwsgi but I have the same issue..

Thank you

brenard avatar Nov 27 '15 19:11 brenard

Anyone have an idea about this problem ? I still search a solution, by adding debug on vpn-ws code, using tcpdump to watch traffic between hosts and applications and I'm able to say that is Apache witch bloc traffic between vpn-ws client and server. I also try to use undocumented Apache mod_Ruwsgi module and it's does not work.

Any ideas are welcome !

brenard avatar Dec 03 '15 14:12 brenard

Have you checked if some kind of traffic reached the vpn-ws daemon when behind apache ?

unbit avatar Dec 03 '15 16:12 unbit

Yes I checked : I have traffic between Apache and vpn-ws daemon until HTTP Upgrade during WS handshake. After that step, I have nothing behind Apache but a could see request and answer between browser and Apache.

brenard avatar Dec 04 '15 10:12 brenard