<div dir="ltr"><div class="gmail_quote gmail_quote_container"><div dir="ltr"><div><div>Hello, </div><div><br></div><div>I have a network namespace which runs a Wireguard VPN (only). </div><div><br></div><div>`` </div><div>❯ ip l<br>1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000<br>    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br>3: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000<br>    link/none`</div><div>```</div><div><br></div><div>I'd like to run squid inside this network namespace. I normally do this using a systemd unit, for example for tinyproxy: <br><br>```</div><div>❯ systemctl cat tinyproxy<br># /usr/lib/systemd/system/tinyproxy.service<br>[Unit]<br>Description=Tinyproxy Web Proxy Server<br>After=network.target<br><br>[Service]<br>Type=forking<br>ExecStart=/usr/bin/tinyproxy -c /etc/tinyproxy/tinyproxy.conf<br>ExecReload=/usr/bin/kill -USR1 $MAINPID<br>PIDFile=/run/tinyproxy/tinyproxy.pid<br>PrivateDevices=yes<br><br>[Install]<br>WantedBy=multi-user.target<br><br># /etc/systemd/system/tinyproxy.service.d/override.conf<br><br>[Service]<br>NetworkNamespacePath=/run/netns/vpn<br>BindReadOnlyPaths=/etc/netns/vpn/resolv.conf:/etc/resolv.conf:norbind<br><br>[Unit]<br>After=vpn.service<br>BindsTo=vpn.service</div><div>```</div><div><br></div><div><br></div>But if I do the same with the systemd unit of squid, it doesn't work. The proxy process still runs within the standard namespace (if I curl using the proxy, the IP is the one of the standard namespace) <br><br></div>Anyone got any ideas? <div><br></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-family:monospace">                ..<br>               /**\<br>              /****\     <br>             /\****/\<br>            /  \**/  \<br>           /    \/    \<br>          /     /\    /\<br>         / \   /  \  /  \<br>        /   \ /    \/    \<br>        \    /\    /\    /<br>         \  /  \  /  \  /<br>          \/    \/    \/<br>                /\ <br>               / +\<br>               \+ /<br>                \/<br>              <a href="http://rdb.is" target="_blank">rdb.is</a><br>       Book a meeting with me:<br>     <a href="https://calendly.com/rdbisme" target="_blank">https://calendly.com/rdbisme</a><br><br></span></div></div></div></div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-family:monospace"><br><br></span></div></div></div>