• Hey, thanks for your script. Maybe add a command to enable IP-forwarding.

    My problem is to make the web-ui available on (local network). Can you give me some iptables-rules or point me in the right direction?

  • Hi, sorry for the late response. Actually changing the last line: socat tcp-listen:$PORT,reuseaddr,fork,range= tcp-connect:$PORT & to socat tcp-listen:$PORT,reuseaddr,fork,range= tcp-connect:$PORT & should be sufficient as long iptables allows $PORT.

    In the past I used nginx to proxy to localhost, this was on a remote machine. Meanwhile I switched to rtorrent and Flood/rutorrent. Since rtorrent does the socket stuff out of the box I don't need the last line anymore.

    Edited by MatFi
  • Yes!! Thanks, works perfectly.

  • Thank you for the script. I encountered a problem, after some time (around 6-8 hours) DNS stopped resolving in netns vpn, after reboot of my Ubuntu Server 20.04 it works fine again. Where do you think a problem can be?

  • Where do you think a problem can be?

    no idea but maybe we will find out. When this happens what is about other dns-servers? you can test in with:

    ip netns exec vpn drill gitlab.com @
    ip netns exec vpn drill gitlab.com @

    If a DNS server is provided by the wireguard config file, comment out the following lines to use the VPN-providers DNS.

    #mkdir -p /etc/netns/vpn
    #echo "nameserver" > /etc/netns/vpn/resolv.conf
    #echo "nameserver" >> /etc/netns/vpn/resolv.conf

    some dns-servers may block traffic from VPN endpoints because of DNS amplification attacks

    Edited by MatFi
  • Thanks. I ran some tests and got myself even more confused. My wireguard conf provides DNS and i commented out creation of resolv.conf before. Command ip netns exec vpn dig gitlab.com @ works fine, but in the same time qBittorrent instantly says "Not working" for every tracker which require name resolution and not just straigth IP, but after reboot it starts working again. I will try and launch qbittorrent regularly without vpn, netns and see what is going to happend.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment