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!

  • 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 – user2146944 Sep 13 '18 at 4:51
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.

  • 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. – user2146944 Sep 13 '18 at 5:26
  • @user2146944 : Try running sudo netstat -tulpen | grep LISTEN and see if 443 is open or not. – 7_R3X Sep 13 '18 at 5:28
  • yes 443 is listening to apache. check the result of the cmd on my original question. – user2146944 Sep 13 '18 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.