Code Monkey home page Code Monkey logo

Comments (4)

Archer2011 avatar Archer2011 commented on July 17, 2024 4

The new netns will have it's own loopback interface, so this don't work.

What you can do, is to create a new named-netns, run fdns in it and use --netns.

Thank you very much. I got it working, those were the steps:

sudo ip netns add myspace
sudo ip link add veth01 type veth peer name veth11
sudo ip link set veth11 netns myspace
sudo ifconfig veth01 192.168.42.1 netmask 255.255.255.0 up
sudo ip netns exec myspace ifconfig veth11 192.168.42.2 netmask 255.255.255.0 up
sudo ip netns exec myspace ifconfig lo up
sudo ip netns exec myspace route add default gw 192.168.42.1

sudo iptables -t nat -A POSTROUTING -s 192.168.42.0/24 -o wifi0 -j MASQUERADE
sudo iptables -A FORWARD -i wifi0 -o veth01 -j ACCEPT
sudo iptables -A FORWARD -o wifi0 -i veth01 -j ACCEPT

sudo ip netns exec myspace fdns

firejail --profile=/etc/firejail/firefox.profile --netns=myspace --dns=127.1.1.1 /opt/firefox/firefox

Source: https://hintcafe.net/post/78293519027/running-a-process-inside-a-network-namespace
https://web.archive.org/web/20220328075635/https://hintcafe.net/post/78293519027/running-a-process-inside-a-network-namespace

from fdns.

rusty-snake avatar rusty-snake commented on July 17, 2024 1

The new netns will have it's own loopback interface, so this don't work.

What you can do, is to create a new named-netns, run fdns in it and use --netns.

from fdns.

rusty-snake avatar rusty-snake commented on July 17, 2024

You mean ip netns exec foobar fdns?

from fdns.

Archer2011 avatar Archer2011 commented on July 17, 2024

You mean ip netns exec foobar fdns?

sudo fdns
firejail --noprofile --net=wifi0 --dns=127.1.1.1 /usr/bin/firefox

from fdns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.