Linux Network Service

  1. I have started the Apache (httpd) service on app server 1 (port:6200).
  2. I have also added the Rule in the Iptables and restated it after saving the IPTables

But when I am using telnet from Jump host, I was facing the below error:
Apache is not reachable on port 6200 on App Server 1

Can anyone please let me know what else is required ?

People are least bothered to answer here :frowning:

Google is your friend.


You’ve the rule added after the reject one, the new rule should be add before it.
It’s checking the rules in sequence till a match is found.
Hope that helps.

1 Like

@ramashish.sharma : Yes, Google is the first and the last friend.
But still looking at the community answers, I got the clues.
But for this Task, there is nothing much related and I failed the task.

@wael.sadek : Once the task is available again, I will follow the info given by you.
Thanks for the help. :slight_smile:

Yes Aman1011,

As suggested by wael.sadek, iptables look in the order from top to bottom.

So next time you get this task you have to use below command and add task at the top of the file.

$ iptables -L INPUT -nv --list-numbers [To see existing iptables in order]

$ iptables -I INPUT -p tcp --dport 8080 -j ACCEPT [-I adds a rule at the begining of the file, this is the
recommended method for adding a new rule in iptables] where 8080 should be the port asked in question.

$ service iptables save

1 Like

Thanks @ramashish.sharma

Solution for Beginners : Linux Network Services Kodekloud

Tutorial/Solution - Content is made for sole reason to help the community.