Bug 1154302 - [rfe] support ability to turn on/off internet access within the sandbox
Summary: [rfe] support ability to turn on/off internet access within the sandbox
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-18 13:58 UTC by Rahul Sundaram
Modified: 2015-01-03 13:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-03 13:32:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rahul Sundaram 2014-10-18 13:58:58 UTC
Description of problem:

The current solutions are rather hacky and involves adding the program to a special user group and blocking that group via iptables.  A simple option in the sandbox would be much appreciated in case you are accessing a program you don't trust to access the internet in a malicious way.

Comment 1 Bruno Wolff III 2014-10-18 18:03:47 UTC
The man page says: "The  default SELinux  policy  does not allow any capabilities or network access."

I didn't see any documentation on how to allow network access.

When I tried testing it I ran into a bug which I will file separately.

Comment 2 Daniel Walsh 2015-01-03 13:32:37 UTC
You need to run with a different selinux type

sandbox -t sandbox_net_t for example.

man sandbox
...
       -t --type
              Use alternate sandbox type, defaults to sandbox_t or sandbox_x_t
              for -X.

              Examples:
              sandbox_t -    No  X,  No Network Access, No Open, read/write on
              passed in file descriptors.
              sandbox_min_t  -    No Network Access
              sandbox_x_t    -    Printer Ports
              sandbox_web_t  -    Ports required for web browsing
              sandbox_net_t  -    All network ports


Note You need to log in before you can comment on or make changes to this bug.