Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

2 Answers

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=127.0.0.1,192.168.42.17.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.