I am user bob and I launch process script.sh. I'd like to block outbound requests made by script.sh to IP X.X.X.X.
bob is not root. bot is unable to get root.
I've tried with iptables using
iptables -A INPUT -s X.X.X.X -j DROP && service iptables save
But I get:
iptables v1.4.21: can't initialize iptables table `filter': Permission denied (you must be root)
More context:
I'm working on a development env with multiple databases and systems. I'm writing some tests to try and simulate when connection between one of the systems is severed (and then reconnected). I'd prefer not to have to have my test run as root if they don't have to...
LD_PRELOADable library -- that's doable, but also circumventable. - Charles Duffy