mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #759] DNS Rebinding protection? #511
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#511
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 @TobiX on GitHub (Sep 2, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/759
Since it came up again recently (http://bouk.co/blog/hacking-developers/), would it be possible to provide DNS rebinding protection (basically deny access to 127.0.0.1 or kill "suspicious" DNS responses) by default in the browser profiles? Or would that break too many legitimate usecases?
@manevich commented on GitHub (Sep 2, 2016):
I think
--net=eth0option is what you need.@manevich commented on GitHub (Sep 2, 2016):
Adding this by as default may be difficult, though.
Local proxies, DNS servers, CUPS web interface, etc will be affected.
@TobiX commented on GitHub (Sep 2, 2016):
I just realized that dnsmasq has --stop-dns-rebind, which rejects "local" IPs from upstream name servers. Basically my second idea... Now how to get this into default resolvers?
I just realized that DNSBL return 127.0.0.x too, so blocking DNS responses for that will break DNSBL :(
@manevich commented on GitHub (Sep 2, 2016):
--netfilteroption of firejail can be used to selectively block access to local IPs/ports.Block ports browser never need connect to, leaving access to local services user may want access from browser.
While this is not complete protection this can reduce exposure, and may be acceptable in default profile.
I am wrong here,
--netfilteris only for new network namespaces.@netblue30 commented on GitHub (Sep 3, 2016):
What happens if you pin down the DNS setting, something like "firejail --dns=8.8.8.8 firefox". In this case 8.8.8.8 goes directly in /etc/resolv.conf. Will firefox still do the rebinding?
@manevich commented on GitHub (Sep 3, 2016):
This depends on configuration of DNS server.
Server may be configured to block private addresses (see comment of @TobiX on dnsmasq, for example).
But as 127.0.0.0/8 addresses are returned by DNSBL servers, it seems very unlikely that mainstream DNS servers will employ such protection.
@chiraag-nataraj commented on GitHub (Sep 30, 2018):
This seems like something that should be addressed on the DNS server end, not firejail? On the
firejailend, I think using a new network namespace is the right way to do this, but as @manevich said, this will break too many usecases. A proper solution should be implemented on the DNS server end, so I'm going to close this.