Cyberflunk ,

So..

reject 121;

In your dhclient?

Got_Bent ,

Does this mean I still can't watch porn in Texas?

Imgonnatrythis ,

Aren't you aware of the loophole that you can as long as your cousin is in it and you hold a rosary while you watch it?

Coasting0942 ,

It’s means the government can watch you visit the porn site. The rest is their imagination.

autotldr Bot ,

This is the best summary I could come up with:


Researchers have devised an attack against nearly all virtual private network applications that forces them to send and receive some or all traffic outside of the encrypted tunnel designed to protect it from snooping or tampering.

TunnelVision, as the researchers have named their attack, largely negates the entire purpose and selling point of VPNs, which is to encapsulate incoming and outgoing Internet traffic in an encrypted tunnel and to cloak the user’s IP address.

The attack works by manipulating the DHCP server that allocates IP addresses to devices trying to connect to the local network.

A setting known as option 121 allows the DHCP server to override default routing rules that send VPN traffic through a local IP address that initiates the encrypted tunnel.

When apps run on Linux there’s a setting that minimizes the effects, but even then TunnelVision can be used to exploit a side channel that can be used to de-anonymize destination traffic and perform targeted denial-of-service attacks.

This remedy is problematic for two reasons: (1) a VPN user connecting to an untrusted network has no ability to control the firewall and (2) it opens the same side channel present with the Linux mitigation.


The original article contains 903 words, the summary contains 196 words. Saved 78%. I'm a bot and I'm open source!

hamid ,
@hamid@lemmy.world avatar

[Thread, post or comment was deleted by the author]

  • Loading...
  • Tiuku ,
    @Tiuku@sopuli.xyz avatar

    While those are valid concerns, it's not really hard to see why people use VPNs. Just look at how companied and countries abuse the internet, abuse us.

    Spotlight7573 ,

    The trust in the unknown systems of the VPN provider may still be better than the known practices of your local ISP/government though. You shouldn't necessarily rely on it too heavily but it's good to have the option.

    the_third , (edited )

    When I design something, critical applications get their own network namespace with only the VPN interface inside anyway. So, yeah.

    barsquid ,

    How do you set this up?

    originalucifer ,
    @originalucifer@moist.catsweat.com avatar

    i think docker allows for this configuration. i use a gluetun container for the network definition of the torrent container to prevent leaking. the torrent container knows of no other network than the vpn container.

    ParetoOptimalDev ,
    the_third ,

    There's readily available docker containers for it but I wanted to build it by hand. Well, more or less, Extremely hacky but it works, so fine for me.

    I started out with cheating and used this wrapper around wg-quick that gives us a persistent network namespace with the tunnel interface in it:

    https://github.com/dadevel/wg-netns

    cat /etc/systemd/system/wg-qbittorrent.service
    [Unit]
    Description=WireGuard Network Namespace for qBittorrent
    Wants=network-online.target nss-lookup.target
    After=network-online.target nss-lookup.target
    
    [Service]
    Type=oneshot
    Environment=WG_ENDPOINT_RESOLUTION_RETRIES=infinity
    Environment=WG_VERBOSE=1
    ExecStart=/opt/wg-netns/bin/wg-netns up /etc/wireguard/wgconfig.yaml
    ExecStop=/opt/wg-netns/bin/wg-netns down /etc/wireguard/wgconfig.yaml
    RemainAfterExit=yes
    
    WorkingDirectory=%E/wireguard
    ConfigurationDirectory=wireguard
    ConfigurationDirectoryMode=0700
    
    CapabilityBoundingSet=CAP_NET_ADMIN CAP_SYS_ADMIN
    LimitNOFILE=4096
    LimitNPROC=512
    LockPersonality=true
    MemoryDenyWriteExecute=true
    NoNewPrivileges=true
    ProtectClock=true
    ProtectHostname=true
    RemoveIPC=true
    RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK
    RestrictNamespaces=mnt net
    RestrictRealtime=true
    RestrictSUIDSGID=true
    SystemCallArchitectures=native
    
    [Install]
    WantedBy=multi-user.target
    

    Then I built a static binary of qbittorrent using this really neat docker image: https://github.com/userdocs/qbittorrent-nox-static

    ...and stuffed the result into a systemd service that runs it in the namespace wg-netns provides:

    cat /etc/systemd/system/qbittorrent-nox.service 
    
    [Unit]
    Description=qBittorrent-nox service
    Wants=network-online.target wg-qbittorrent.service 
    After=local-fs.target network-online.target nss-lookup.target wg-qbittorrent.service 
    
    [Service]
    Type=simple
    PrivateTmp=false
    #User=qbittorrent
    ExecStart=/usr/sbin/ip netns exec ns-qbittorrent sudo -u qbittorrent /opt/qbittorrent/qbittorrent-nox
    TimeoutStopSec=1800
    RestartSec=15
    RestartMaxDelaySec=600
    RestartSteps=10
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
    
    

    To get the webui out of that I stuck two instances of socat together at the stdout and from there it depends on whatever you want to use as a reverse proxy on the host - or you bind to a network interface if you trust the network:

    cat /etc/systemd/system/qbittorrent-webui.service 
    [Unit]
    Description=qBittorrent-nox webui forwarding into its namespace
    Wants=network-online.target wg-qbittorrent.service 
    After=local-fs.target network-online.target nss-lookup.target wg-qbittorrent.service 
    
    [Service]
    Type=simple
    PrivateTmp=false
    ExecStart=/opt/qbittorrent/forward-webinterface.sh
    TimeoutStopSec=1800
    Restart=always
    RestartSec=10
    
    [Install]
    WantedBy=multi-user.target
    
    cat /opt/qbittorrent/forward-webinterface.sh
    #!/bin/sh
    set -eu
    
    exec socat tcp6-listen:"8080",reuseaddr,fork,range=[::1]/128 "exec:ip netns exec ns-qbittorrent socat stdio 'tcp-connect:127.0.0.1:8080',nofork"
    
    

    Works, is reboot safe, stopped caring about beauty at that point.

    barsquid ,

    This is so cool, thank you!

    xabadak ,

    Do you know how to make it so all the host's traffic is sent through the VPN namespace? I couldn't figure out how to do this so I ended up just writing my own firewall. Network namespaces seems like a better solution.

    the_third ,

    I haven't found the time to research an answer for you, sorry. The way I'd go is: create a veth of your physical uplink and stuff it into its own namespace with dhcp client and wg userspace tools. Do not configure the original interface in your initial namespace. Use the approach wg-netns uses to spawn the tunnel interface in initial network ns. Done.

    xabadak ,

    No worries, and thanks for providing a response nonetheless. I'll look into your suggestion when I have the time. The official Wireguard website also had some guide on network namespaces here but afaik it didn't explain how to set it up persistently

    BorgDrone ,

    (…) the entire purpose and selling point of VPNs, which is to encapsulate incoming and outgoing Internet traffic in an encrypted tunnel and to cloak the user’s IP address.

    No. That is not the entire point of a VPN. That’s just what a few shady companies are claiming to scam uninformed users into paying for a useless service. The entire point of a VPN is to join a private network (i.e. a network that is not part of the Internet) over the public internet, such as connecting to your company network from home. Hence the name ‘virtual private network’.

    There are very little, if any, benefits to using a VPN service to browse the public internet.

    the_third ,

    Well, for one, using one of those VPN providers has kept DMCA takedown notices away from me or the hosting provider of my seed box. So that is useful.

    Passerby6497 ,

    There are very little, if any, benefits to using a VPN service to browse the public internet.

    I've run into issues multiple times where a site doesn't load until I turn on my VPN with an endpoint in the EU

    desktop_user ,

    There are very little, if any, benefits to using a VPN service to browse the public internet.

    accessing services that are blocked in your region.

    lurch ,

    that works, but a regular SOCKS proxy should do. for HTTP even a HTTP proxy. many VPN providers offer them too, btw.. may help with mitigating this attack vector.

    mako ,

    There are very little, if any, benefits to using a VPN service to browse the public internet.

    This is why it's often best to just avoid the comments completely

    vext01 ,
    @vext01@lemmy.sdf.org avatar

    Come to think of it, why do they even call this use case a VPN? I'd call that a proxy.

    Buelldozer ,
    @Buelldozer@lemmy.today avatar

    Meh, option 121 shenanigans can be detected and remediated via post connection scripting.

    Emmie , (edited )

    If someone uses vpns for anything other than region locked content then that’s not very smart.

    It’s one big security risk and no attacks are necessary for some vpn company tech to sell your data. Hell I’d do it myself to a highest bidder, sorry.

    It’s like walking naked around some stranger’s house and trusting them to close their eyes.

    Couldbealeotard ,
    @Couldbealeotard@lemmy.world avatar

    Encrypted VPN tunnels are ubiquitous in many industries for remote connection to private clouds. They are used by virtually every high functioning company in the world, and getting more common for mid and lower tier companies as well.

    Emmie ,

    I am thinking more in the vein of piracy or hacking not some business stuffs

    WeebLife ,

    Are you saying it's smarter to not use a VPN for piracy?

    Couldbealeotard ,
    @Couldbealeotard@lemmy.world avatar

    Maybe you can explain what you actually mean then, because I don't understand your point.

    I would say those dollar-store VPN products people use for geo-spoofing is the worst security risk when it comes to VPNs. You are sending your data through some other company that you have no control or insight into. You have no idea what network security they employ, or whether they are willing or obligated to release your data to other parties.

    Buddahriffic ,

    There's no real way to know if VPNs intended for the public are run the same as those intended for enterprise. Windows doesn't have a lot of the same BS in their enterprise versions that are in the personal ones. Even with the same software, it could just be a checkbox that the salesperson can check for big businesses with legal teams that read and enforce contracts.

    Buddahriffic ,

    I assume this is definitely the case for free VPNs, if any of those still exist. There might be some willing to donate bandwidth and compute resources for the good of others, but I'm sure there's more that pretend to do that but actually just sell the data or maybe just spy.

    Tbh I wouldn't be surprised if this is also the case for TOR nodes. I wonder how many entry and exit points are run by the NSA or some other government entity. Or are just monitored. If you can monitor the entry and exit points, you can determine both the source and destination, and just match them together using the middle node address.

    Same thing with proxies.

    Paid VPNs could go either way. On the one hand, they could make more money if they are willing to sell out their users' privacy. On the other hand, that risks the entire thing falling apart if word gets out that it's not private, since that's the whole point of VPNs. I'm sure there's some good ones out there but I'm also sure that there's bad ones and wouldn't be surprised if some of the ones considered good are actually bad.

    Maybe ones that run in Europe would be safer bets. Their business is at least able to run there with the privacy laws. Maybe they are skirting them and haven't been caught yet, maybe their data sales from other regions are profitable enough to support European operations without data sales, but if they are going for max greed and min risk, maybe they wouldn't operate there. Or maybe they just run things differently in the different regions to maximize global profits.

    AnAnonymous ,

    A good reason to never trust in shady VPNs.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • kbinchat
  • All magazines