K
K
kaktak2552021-04-13 00:01:09
linux
kaktak255, 2021-04-13 00:01:09

How to block a program from accessing the Internet?

How to block a program from accessing the Internet?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shurshur, 2021-04-13
@kaktak255

1. Filter by owner: iptables -m owner -h
2. Use cgroups and filter by them: iptables -m cgroup -h
3. Use separate network namespace without internet access: ip help netns
4. Use docker with none network: docker run -it --net=none my_awesome_image_for_application

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question