-1

I have Centos7 VM built using vagrant with private IP address of:192.168.56.255

I am running my Spring boot application on that VM on port 8443. It supports HTTPS. My issue is that when try to send https requests to 192.168.56.255 web server via Curl command i got

curl: (7) Couldn't connect to server

I have read many tutorials that explain how to configure my Firewall in Cento7 but still got the same issue one is provided by DigitalOcean

When I type

sudo firewall-cmd --list-all-zones

I got

public
  target: default
  icmp-block-inversion: no
  interfaces:
  sources:
  services: ssh dhcpv6-client https http mysql
  ports: 8443/tcp 3306/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

As you can see I enabled everything I need and more but still. I even shut down the Firewall but still the connection is refused from my host.

When I made the changes I did reload my firewall

sudo firewall-cmd --realod

So that is not the problem

Faisal Julaidan
  • 388
  • 4
  • 16
  • Open firewall port 8443 on CentOS 7 first. see this https://stackoverflow.com/questions/24729024/open-firewall-port-on-centos-7 – Satish Kr May 07 '18 at 04:23
  • I did add the port and I confirmed that by running sudo firewall-cmd --list-ports I got "8443/tcp 3306/tcp" Still connection refused from the host – Faisal Julaidan May 07 '18 at 04:25

1 Answers1

0

The problem was not with the Firewalld but with the pre-configured IP address using Vagrant.

The IP address should not be 255 in the first byte as I did 192.168.56.255 because that indicates that this is a broadcast address. So i solved it by changing it to 192.168.56.10

Faisal Julaidan
  • 388
  • 4
  • 16