1

i have a Linux Ubuntu 12.04.3 LTS with Elastic Search installed. the Elastic Search is configured to accept the local requests via HTTP. i have a php website on the same server. it was on port 80 but it is required to use HTTPS on port 443.

i am having problem configuring the firewall/iptables to make port 443 available.

tried:

sudo ufw allow https

but it still shows inactive on the status: sudo ufw status verbose

#Status: inactive

also tried to add port 443 to the iptables, but made no difference afterwards:

iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT

netstat does show 443 is listening to apache.

netstat -ntlp | grep LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 30542/apache2

when i test the site, it shows "The connection has timed out" err, also tried curl cmd on the server, same result. and nothing appeared on the access or error logs.

help to provide the website urls but privately.

any helps, comments, tips will be much appreciated!

1
  • here is the actually Error on fiddler: 502, it is interesting to see the protocol was still HTTP. # Result Protocol Host URL Body Caching Content-Type Process Comments Custom 23 502 HTTP Tunnel to ~~~~.com:443 512 no-cache, must-revalidate text/html; charset=UTF-8 iexplore:6736 Commented Sep 13, 2018 at 4:51

1 Answer 1

0

If you're on a Debian based Linux system, as you are(Ubuntu), I'd suggest using ufw.

Status inactive means you have not activated the firewall even though you might (or might not) have configured the rules. Try using:

ufw enable

Followed by,

ufw allow https

Now, you could check the status by using

ufw status

Edit: You need to add ufw to the startup too to enable ufw rules to take effect every time you reboot your machine.

3
  • hi 7_R3X, thanks for your comment, i have run the cmd as stated on my original question. ufw status shows: To Action From -- ------ ---- 443 ALLOW IN Anywhere 443 ALLOW IN Anywhere (v6) but it doesn't fix the issue. Commented Sep 13, 2018 at 5:26
  • @user2146944 : Try running sudo netstat -tulpen | grep LISTEN and see if 443 is open or not. Commented Sep 13, 2018 at 5:28
  • yes 443 is listening to apache. check the result of the cmd on my original question. Commented Sep 13, 2018 at 5:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.