Server Fault is a question and answer site for system and network administrators. 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

I built a webapp that uses libpcap (via jpcap).

In order to be able to get the network interfaces list or to bind to a network interface, the application (in this case a webaap that runs from tomcat server) must be running with root privileges.

During development I simply ran Eclipse with root privileges (sudo eclipse) and my webapp worked just fine with Eclipse's local tomcat server.

However, when I try to deploy my webapp to the "real" tomcat server, it isn't working. I Also tried to start the tomcat6 service with sudo and changed the TOMCAT6_USER definition (defined in /etc/init.d/tomcat6) from "tomcat6" to "root" but it made no difference.

What should I do to make it work?

share|improve this question

Starting tomcat with Authbind=yes in /etc/default/tomcat6 may do what you want.

share|improve this answer

Why not keep tomcat running as non root for security and let iptables forward port 80 to 8080?

Ex in iptables:

-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-port 8080

share|improve this answer
I'n not quite sure I understand what you suggested. How this will make the webapp privileged so the libpcap use in it will be possible? – Hagay Myr Apr 1 '12 at 22:13

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.