Ask Your Question
2

How I block internet access for a concrete program?

asked 2014-07-20 06:30:15 -0600

Holis gravatar image

I need block internet access for a program but i don't know why I can configure the firewall for it can do it

edit retag flag offensive close merge delete

Comments

Please give more detail on what exactly you want to achieve: deny outgoing connections to a program? Which program? Who will run this program? The firewall is probably not able to do what you need, but "unshare -n <program>" may fit your need, or maybe you need to create a SELinux module for this.</program>

tonioc gravatar imagetonioc ( 2014-07-20 07:21:18 -0600 )edit

What's the thing, @tonioc? LOL

abadrinath gravatar imageabadrinath ( 2014-07-24 05:33:25 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-07-23 05:27:24 -0600

The most secure solution is probably (as I've done this on FreeBSD Jails but not on Fedora) is to put the application in an LXC app container and disable network for that container.

edit flag offensive delete link more
0

answered 2014-07-20 09:50:55 -0600

FranciscoD_ gravatar image

Hi! Welcome to Ask Fedora!

If you can ascertain what ports your program uses, you should be able to block these and as a result block access to your program.

Please take a minute out to read through the forum guidelines here: https://fedoraproject.org/wiki/Ask_fedora_guidelines

edit flag offensive delete link more

Comments

Can you elaborate on how a user can find the ports that a program uses ? Thanks.

NickTux gravatar imageNickTux ( 2014-07-20 14:26:45 -0600 )edit

I didn't add the info because I'm not aware of a standard way of doing this. More often than not you need to read the documentation which may or many not list the required ports. Some applications also use dynamic ports when required, in which case it's much harder to pin down one port. :(

FranciscoD_ gravatar imageFranciscoD_ ( 2014-07-20 19:17:04 -0600 )edit

Maybe add the netstat -anp|more command to the answer?

abadrinath gravatar imageabadrinath ( 2014-07-26 01:01:07 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-20 06:30:15 -0600

Seen: 1,620 times

Last updated: Jul 23 '14