Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My server executes third party software which processes user submitted files. I want to block outgoing connections from my process. How can I do it in FreeBSD?

share|improve this question
I tried using Java's -DsocksProxyHost and -DsocksProxyPort system properties to redirect traffic to unexisting proxy server. It worked on Linux but not on FreeBSD. Any ideas? – Tom May 5 '11 at 11:04
up vote 2 down vote accepted

I think you're looking for a jail. This is a restrictive environment in which processes have limited access to files, networks and system settings. The handbook explains how to set up a jail. You'll want to block the jail from networking altogether with the ipv4=disable ipv6=disable parameters to jail, or at least restrict connectivity to a few addresses with something like ipv4.addr=,

share|improve this answer

You could run this process under separate account and block traffic by UID, see ipfw man page for uid option.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.