I try to open port 81 as a virtualhost. after setting apache, I can CURL localhost:81 from local machine and get response(yes it was listening port 81). However, when visit the same address from remote browser, browser always show TIME OUT error.
I thought it might be due to firewall or selinux, so I disable both of them and try again but still failed. The commands I used to disable selinux and firewall are as below:
to disable selinux:
open /etc/selinux/config and change SELINUX=disabled and then reboot. I use sestatus command to check and output shows it was disabled.
to close iptables:
service iptables stop
chkconfig iptables off
and I close ip6tables either:
service ip6tables stop
chkconfig ip6tables off
I am using CentOS 6.3. Are there other security issues besides selinux and iptables that I didn't notice?
Add more information
I use IP address directly, like 123.123.123.123:81. I don't think it is due to apache conf since I can get response from local server machine through both
curl locahlost:81
and curl 123.123.123.123:81
.
Netstat result
after running netstat command, I got the
tcp 0 0 :::80 :::* LISTEN 1809/httpd
tcp 0 0 :::81 :::* LISTEN 1809/httpd
seems both 80 and 81 are working.
Ifconfig
here is the ifconfig -a
result:
eth0 Link encap:Ethernet HWaddr 00:50:56:9B:24:D6
inet addr:101.251.235.162 Bcast:101.251.235.163 Mask:255.255.255.252
inet6 addr: fe80::250:56ff:fe9b:24d6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16046 errors:0 dropped:0 overruns:0 frame:0
TX packets:15092 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3370807 (3.2 MiB) TX bytes:2352380 (2.2 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:70 errors:0 dropped:0 overruns:0 frame:0
TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:19119 (18.6 KiB) TX bytes:19119 (18.6 KiB)
ifconfig -a
please