firejail
Last updated
Last updated
Eg. Firefox
--net=eth0
:
Restrict network access to the eth0
interface. To allow this option for regular (non-root) users, we have to comment out the restricted-network yes
line in the /etc/firejail/firejail.config
file:
Suppose we have a simple web server running on localhost port 8888:
Usually, accessing http://localhost:8888 from the web browser will return the directory listing from which the server is running. However, if we supply the option --net=eth0
to the firejail command when running the web browser (eg. firefox), the access will be blocked, and we will receive an error when trying to access the address.
This is because we access the localhost address via the loopback (lo
) interface, which has not been allowed.
Safe document viewer