I want to open port 443 in my Debian 8 server but i get permission denied error.my rules.v4 file looks like:# Generated by iptables-save v1.4.21 on Wed Feb 15 14:42:03 2017*filter:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [208710:151335680]-A INPUT -p icmp -m comment --comment 000 accept all icmp -j ACCEPT-A INPUT -i lo -m comment --comment 001 accept all to lo interface -j ACCEPT-A INPUT -m comment --comment 002 accept related established rules -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT-A INPUT -p tcp -m multiport --dports 22 -m comment --comment 099 allow ssh access -j ACCEPT-A INPUT -p tcp -m multiport --dports 80,443 -m comment --comment 100 allow http and https access -j ACCEPT-A INPUT -p tcp -m multiport --dports 1122 -m comment --comment 150 allow phpmyadmin access -j ACCEPT-A INPUT -m comment --comment 999 drop all -j DROPCOMMIT# Completed on Wed Feb 15 14:42:03 2017After making the changes in /etc/iptables/rules.v4 i tried to save withsudo iptables-save > /etc/iptables/rules.v4I get error message -bash: /etc/iptables/rules.v4: Permission denied I tried with sudo bash -C iptables-save > /etc/iptables/rules.v4 i get no such file or directory when the file exists.I also tried with teesudo tee iptables-save > /etc/iptables/rules.v4andsudo sh -c iptables-save > /etc/iptables/rules.v4when i do netstat -tulnp | grep 443 i get no output.
Permission denied when saving iptable rules in Debian 8
linux;bash;debian