Is there a way to prevent a specific process from creating any TCP/UDP connection under Linux? Just like the firewall under Windows, I need to block a process's any network activity.
on 01/07/2013 – Made popular on 01/07/2013
Supervisor restarts a process that dies whenever the network is downed and keeps dying while the network is down. This works most of the time, except when the process enters a FATAL state after the startretries parameter in my Supervisor config is exceeded because the network is still down.
I have read that a forever process like daemon should run with a sleep() in their while(1) or for(;;) loop. They say, it is required because otherwise this process will always be in a run queue and the kernel will always run it. This will block the other process. I don't agree that it will block the other process completely. If there is a time slicing, then it will execute other process.
Iptables, is a great tool to create firewall in Linux, actually it is not only for that, but useful to pre-process or post-process any package of data that arrives to our Linux Operating System machine.
The other day I was needing to block the access to my network using the mac address of a machine, and Iptables come to save my day.
There is a certain process that goes nuts when the computer thinks that I'm away (5 minutes of no user input and the screen goes dark) and the only known way to prevent it from causing trouble (apart from not going away) is either killing the process or suspending it.
When I'm playing a game, I don't want Dropbox taking hogging my network connection. I have been able to noticeably reduce my latency by turning it off while playing. The same is true to a lesser extend for web browsing.
I'm looking for network equivalents for niceness and scheduling policies (SCHED_BATCH etc. in schedtool). Does such a thing exist?