I reboot the RHEL7 on the AWS, the ftp and httpd was not working, ftp cannot connect and http://54.169.139.195/ website cannot open, was checking where the problem was,
1, checked the ftp and httpd service is up and running.. all are working fine.
service httpd status
service vsftpd status
netstat -ntulp | grep httpd
netstat -ntulp | grep ftpd
2, checking the local connection, working fine.
elinks 127.0.0.1
3, checking the EC2 security groups configuration, the port 80 and port 21 are all allowed.
4, found “virbr0” is up by “ifconfig” command, removed the virbr0 interface by reference to this link http://website-humblec.rhcloud.com/how-to-removedelete-virbr0/.
virsh net-destroy default
5, finally found the reason, the firewalld was up and running, not sure when I started this service..
firewall-cmd --add-service=ftp --permanent
firewall-cmd --add-service=http --permanent
firewall-cmd --reload
or the simplest way to do this is as below, as the AWS has the firewall running already…
iptables flush
Reference link:
http://website-humblec.rhcloud.com/how-to-removedelete-virbr0/
http://www.thegeekstuff.com/2011/01/redhat-iptables-flush/
http://www.tecmint.com/configure-firewalld-in-centos-7/3/
https://progeeking.com/2015/09/26/oelrhel-7-firewalld/
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Migration_Planning_Guide/sect-Red_Hat_Enterprise_Linux-Migration_Planning_Guide-Security_and_Access_Control.html