I am trying to save iptables rules file to /etc/sysconfig/iptables. I want to do this without logging in to root. I tried to using
sudo iptables-save > /etc/sysconfig/iptables
but it throws permission denied error.
How can i save the file without logging in to root ? I am using this in my app so i don't want to login to root through the app.
Thanks