TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What is best way to block internet per application basis in Linux

2 pointsby sanroot99over 2 years ago
I stumbled upon very old forums in internet ,but all were cumbersome ,most common was to create separate nointernet group and run application with it ,i am surprised iptable don't have feature like this inbuilt ,my current solution is to use firejail

2 comments

ThatGeoGuyover 2 years ago
Flatpak and Snaps get their fair share of flak for a number of legitimate reasons, but one thing that I find really nice is that you can deny that permission to them.<p>Flatseal is actually a good GUI client for doing so. It can modify and tweak the permissions that different apps have. Just turn off the network permission and boom - you&#x27;ve turned off all access to the network for that app.<p>Of course this means your application has to be bundled into a Flatpak or Snap in some way (and the UX for doing this with Snaps is pretty bad IMO), so you&#x27;ll probably find that your mileage may vary.<p>Another alternative is to use apparmor and disallow the `net_raw` capability on a per-application basis (this won&#x27;t matter how your app is bundled) but that can be exhausting to set up individually.
评论 #32799883 未加载
fhaldridge7over 2 years ago
you can try opensnitch <a href="https:&#x2F;&#x2F;github.com&#x2F;evilsocket&#x2F;opensnitch" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;evilsocket&#x2F;opensnitch</a>
评论 #32799888 未加载