2

After setting up a VPN killswitch I noticed that a few things don't work: aptitude, python scripts using requests, & wget. (curl does work). Does anyone know why?

My ufw settings are:

Status: active

To                         Action      From
--                         ------      ----
Anywhere on tun0           ALLOW       Anywhere                  
8.8.8.8                    ALLOW       Anywhere                   
8.8.4.4                    ALLOW       Anywhere                  
Anywhere                   ALLOW       192.168.0.0/24            
Anywhere                   ALLOW       224.0.0.0/24              
127.0.0.1                  ALLOW       Anywhere                  
Anywhere (v6) on tun0      ALLOW       Anywhere (v6)             
ff01::/16                  ALLOW       Anywhere (v6)             
ff02::/16                  ALLOW       Anywhere (v6)             
ff05::/16                  ALLOW       Anywhere (v6)             
::1                        ALLOW       Anywhere (v6)               

Anywhere                   ALLOW OUT   Anywhere on tun0          
VPN IP                     ALLOW OUT   Anywhere                  
192.168.0.0/24             ALLOW OUT   Anywhere                  
8.8.4.4                    ALLOW OUT   Anywhere                  
8.8.8.8                    ALLOW OUT   Anywhere                  
224.0.0.0/24               ALLOW OUT   Anywhere                  
VPN DNS IP                 ALLOW OUT   Anywhere                  
127.0.0.1                  ALLOW OUT   Anywhere                  
Anywhere (v6)              ALLOW OUT   Anywhere (v6) on tun0     
ff01::/16                  ALLOW OUT   Anywhere (v6)             
ff02::/16                  ALLOW OUT   Anywhere (v6)             
ff05::/16                  ALLOW OUT   Anywhere (v6)             
::1                        ALLOW OUT   Anywhere (v6)             

I added a few DNS IP's so the internet connects more quickly when waking up.

The python script I am testing is just 3 lines:

import requests
r = requests.get("http://www.google.com")
print "worked", len(r.text)

When I run it, dmesg -w I think says it's trying to run on the wireless interface:

[UFW BLOCK] IN= OUT=wlp2s0 SRC=2605:e000:2e44:dc00:0000:0000:0000:0005 DST=2607:f8b0:4000:0800:0000:0000:0000:2004 LEN=80 TC=0 HOPLIMIT=64 FLOWLBL=384122 PROTO=TCP SPT=40074 DPT=80 WINDOW=28800 RES=0x00 SYN URGP=0 

Is there something I can change to make this work?

3
  • 2
    It is using IPv6. how are your routing rules for IPv6 ? Does the traffic is set to goes to the VPN tunnel for IPv6 also ?
    – DevOps
    Apr 24, 2017 at 16:24
  • I'm not sure, how can I check this? I tried enabling forwarding in /etc/default/ufw & /etc/ufw/sysctl.conf with no luck.
    – Charles L.
    Apr 25, 2017 at 14:07
  • I worked around this by disabling ipv6, which is ok enough for me. I added net.ipv6.conf.all.disable_ipv6=1, net.ipv6.conf.default.disable_ipv6=1, and net.ipv6.conf.lo.disable_ipv6=1 to /etc/sysctl.conf then ran sudo sysctl -p
    – Charles L.
    Apr 26, 2017 at 3:19

0

You must log in to answer this question.

Browse other questions tagged .