mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3269] --netns= traffic does not go over socks5 ssh tunnel #2050
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2050
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rogueknight1137 on GitHub (Mar 7, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3269
I have an Ubuntu 18.04 server in which I've created two virtual interface pairs (veth0a & veth0b) and assigned the end of one interface (veth0b) to a new network namespace (netns0):
I then used firejail to force a specific user (test-user) to use this new namespace by default by setting
/usr/bin/firejailas the default shell for this user and by adding the following to the/etc/firejail/login.usersfile:I've ran the following test to make sure this works:
tshark -i veth0a -f "port 443"from the root accountcurl https://1.1.1.1as SSH userThe tshark output shows the proper veth0b source IP address for the 1.1.1.1 traffic.
The issue I'm running into is when trying to use the test-user account to establish socks5 dynamic port forwarding over SSH:
Running this command from my laptop or workstation allows me to establish a local socks5 server on port 1000 and tunnel it over the SSH connection. Setting this as my local socks5 proxy and going to
https://api.ipify.orgdemonstrates that the proxy is working and that my laptop is using the server's IP address.The issue is that the sock5 traffic does not appear to be going through the proper namespace. In other words, while browsing the web on my laptop while connected to the socks5 server over the test-user ssh connection my traffic does not appear in tshark -i veth0a.