T
T
Tolik2015-06-09 19:54:51
linux
Tolik, 2015-06-09 19:54:51

How to whitelist output traffic on Linux?

I would like to deny access to the Internet to all programs, except for a few (by the name of the process, or, better, by the process ID). Those will run proxies on the locale, and if the program wants the Internet, let it use this proxy, otherwise its problems. I heard that firewalls are used for this. For example, iptables. But I don’t know the specific addresses with which darknets will connect. How to act here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2015-06-09
@Diel

The -m owner module also has the key "--pid-owner"
/sbin/iptables -A OUTPUT -o eth0 -m owner --pid-owner 1000 -j DROP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question