Connection to Port 80 refused
Posted: 2020/10/06 11:13:01
Goodday everyone, i am new in Linux and especially in Centos. I installed it on a Virtual box to utilize a server programm. Thing is i can't install anything or updates anything because everytime i have an error with port 80 : connection refused.
I searched A LOT on the internet but i can't find a solution. I don't have apache installed because i can't install it with the yum command and i did not find any guide to install it manually.
Here you can see that i have http and https (also ssh) added to the firewall, my iptables and the error with curl.
[root@localhost ~]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: cockpit dhcpv6-client http https ssh
ports:
protocols:
masquerade: yes
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@localhost ~]# iptables -nL --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53
2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:67
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 ctstate RELATED,ESTABLISHED
2 ACCEPT all -- 192.168.122.0/24 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:68
[root@localhost ~]# firewall-cmd --add-port=80/tcp --permanent
success
[root@localhost ~]# curl -a 192.168.77.50
curl: (7) Failed to connect to 192.168.77.50 port 80: Connection refused
[root@localhost ~]#
if any of you now anything it will be of great help. I am running Centos 8 on VMware in a Windows 10 if this may help.
I searched A LOT on the internet but i can't find a solution. I don't have apache installed because i can't install it with the yum command and i did not find any guide to install it manually.
Here you can see that i have http and https (also ssh) added to the firewall, my iptables and the error with curl.
[root@localhost ~]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: cockpit dhcpv6-client http https ssh
ports:
protocols:
masquerade: yes
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@localhost ~]# iptables -nL --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53
2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:67
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 ctstate RELATED,ESTABLISHED
2 ACCEPT all -- 192.168.122.0/24 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:68
[root@localhost ~]# firewall-cmd --add-port=80/tcp --permanent
success
[root@localhost ~]# curl -a 192.168.77.50
curl: (7) Failed to connect to 192.168.77.50 port 80: Connection refused
[root@localhost ~]#
if any of you now anything it will be of great help. I am running Centos 8 on VMware in a Windows 10 if this may help.