Report this

What is the reason for this report?

I have a https jenkins server running on https on port 1444. I set the iptable rules but it does not work as expected.

Posted on January 25, 2021

I set the following iptable rules:

  1. iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT # Since I want to allow ssh from anywhere into the host that hosts the jenkins server
  2. iptables -A INPUT -p tcp --dport 1444 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT #Since the jenkins server runs on port 1444. Note: The server is https
  3. iptables -A INPUT -j DROP #I want all other traffic other than ssh and https to be dropped

Is there something wrong I am doing while setting the rules? Please help



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @ksd17,

The rules look okay however I do have a question, how are you trying to access the application? Are you using a port or just typing in the domain name IE.

https://domain.com

or

https://domain.com:1444

The second command should work, while the first one shouldn’t unless you’ve configured some kind of a reverse proxy, maybe with Nginx.

Regards, KFSys.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.