title: Giving django app root access?
body: <p>I am trying to build an api using django which should alter iptables using POST parameters. I am using django 1.4, <a href="http://django-rest-framework.org/" rel="nofollow">djangorestframework</a>, <a href="https://github.com/ldx/python-iptables" rel="nofollow">python-iptables</a>. The problem I am facing is that python-iptables need root access to change iptables rules. I can change the iptables rules by doing <code>$ sudo python</code> and from the python shell I can change those rules. Also I can change those rules by using <a href="https://pypi.python.org/pypi/iptdump" rel="nofollow">iptdump</a> module which takes in iptables parameters and create those rules which I can later save in a file (iptables.rules.txt) and use fabric's <code>local('sudo iptables-restore &lt; iptables.rules.txt')</code>. But this will always prompt the user for a root password. Is there a way I can give django app root privileges so that I can bypass sudo password prompt.</p>