Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable/enable Jira port on RHEL

Emanuel Jianu February 13, 2020

I am new to Linux firewalls, but would like to use these to disable the communication with the load balancer on one Jira node to perform re-indexing using a back-door port. When the indexing has finished I need to enable the traffic. Load balancer health-checks do not work for us. What should I use, and what are the exact commands?

2 answers

1 accepted

0 votes
Answer accepted
Thomas Deiler
Community Champion
February 13, 2020

Dear @Emanuel Jianu ,

to block a specific port you can use following command on the host that provides the interface to the users (browsers):

iptables -A INPUT -p tcp --dport <PORT> -j DROP

Instead of DROP you could use REJECT. This is more user friendly, because with the DROP the browser will wait until its internal timeout is hit. In both cases the packets cannot pass.

To remove this rule:

iptables -D INPUT -p tcp --dport <PORT> -J DROP

Note: the first rule adds a rule at the end of all existing rules (if there are any). If a TCP packet matches another rule before, this new one is never hit.

As I do not know the details of your infrastructure, hosts and load balances, the upper rule could be "sub-optimal". If you tell me more, I can be more precise.

So long

Thomas

0 votes
Emanuel Jianu February 14, 2020

Hi Thomas,

Thank you for your response!

I confirm I was able to use iptables to disable/enable a certain port on our Jira test instances using the two commands below.

iptables -A INPUT -p tcp --dport <PORT> -j DROP

 

iptables -D INPUT -p tcp --dport <PORT> -j DROP

 

Suggest an answer

Log in or Sign up to answer