Application Security KodeKloud

 


Question: Allow all incoming traffic to Nginx 8096 port and Block to Apache 5004 port

Solution:

Login to backup server and add these two rules

sudo iptables -A INPUT -p tcp --dport 8096 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT

sudo iptables -A INPUT -p tcp --dport 5004 -m conntrack --ctstate NEW -j REJECT

Then save it by typing following command

sudo iptables-save > /etc/sysconfig/iptables

Now, check if the rules are added or not

cat /etc/sysconfig/iptables



Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

5 comments:

  1. when I went to save the IP tables "sudo iptables-save > /etc/sysconfig/iptables" it said I did not have permissions, went in with VI and manually added. success.

    ReplyDelete
  2. Indeed, even numerous entrepreneurs have likewise begun utilizing security camera because of simple establishment. tampa security cameras

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. It's ideal to appropriately utilize something a lot easier that they know about like a secondary school understudy proposed. Security Cameras

    ReplyDelete