LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2015, 07:24 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
how to open tcp 80 port?


My box is centos 7.1 x64 as guest on windows 10 x64 as host.

I've installed xampp at centos but I could not open web page from centos even though "http://localhost/dashboard" and "http://192.16.8.0.4/dashboard" is working well at firefox at centos.

The resulr "nestat -na" is this.

Quote:
[root@localhost ~]# netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN
tcp 0 0 localhost:ipp 0.0.0.0:* LISTEN
tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN
tcp6 0 0 [::]:http [::]:* LISTEN
tcp6 0 0 [::]:ftp [::]:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 localhost:ipp [::]:* LISTEN
tcp6 0 0 localhost:smtp [::]:* LISTEN
tcp6 0 0 [::]:https [::]:* LISTEN
udp 0 0 0.0.0.0:ntp 0.0.0.0:*
udp 0 0 localhost:323 0.0.0.0:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 localhost:323 [::]:*
raw6 0 0 [::]:ipv6-icmp [::]:*
And I did these commands at centos.
1. systemctl stop firewalld
2. for iptables,
Quote:
iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
iptables -I OUTPUT 1 -p tcp --dport 80 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 21 -j ACCEPT
iptables -I OUTPUT 1 -p tcp --dport 21 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 22 -j ACCEPT
iptables -I OUTPUT 1 -p tcp --dport 22 -j ACCEPT
iptables -I INPUT 1 -p tcp --dport 5900 -j ACCEPT
iptables -I OUTPUT 1 -p tcp --dport 5900 -j ACCEPT
3. and,
Quote:
[root@localhost ~]# sestatus
SELinux status: disabled
And at the host windows' firewall is disabled.


Any helpful comments would be appreciated.

Thanks in advance.

Last edited by windstory; 11-09-2015 at 07:35 AM.
 
Old 11-09-2015, 07:40 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,516

Rep: Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436
one cannot just open a port, it has no meaning. Usually there is a process listening on that port and if a port is opened it means there is a process listening on that port. So if you want to open a port you need to start a process or configure it to use that port.
Actually I do not understand your problem, so can you please describe it a bit better....
 
1 members found this post helpful.
Old 11-09-2015, 07:41 AM   #3
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,688

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
You are running Firefox on Centos, are able to access a localhost page and a page on 192.16.8.0.4, but unable to open a web page on that Firefox browser. Correct?

Which page are you unable to open?
Which system has 192.16.8.0.4 (Centos I believe, but can you confirm?)?
What do you want to achieve?
 
1 members found this post helpful.
Old 11-09-2015, 07:54 AM   #4
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
I want to access a localhost page and a page on 192.16.8.0.4 from 192.168.0.2.

1. I want to open the xampp's dashboard as shown in the attached photo.


2. Yes, 192.168.0.4's system is centos.
3. I want to open "http://maestro.iptime.org" or "http://maestro.iptime.org/dashboard" from 192.168.0.2 and on the web.
Attached Thumbnails
Click image for larger version

Name:	xampp dsahboard.jpg
Views:	12
Size:	165.1 KB
ID:	20008  
 
Old 11-09-2015, 08:27 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,516

Rep: Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436
first, is your page available on the localhost (so on maestro.iptime.org using http://localhost)?
 
1 members found this post helpful.
Old 11-09-2015, 08:32 AM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
When I open "http://localhost" and "http://192.168.0.4", then automatically opened "http://localhost/dashboard" and "http://192.168.0.4/dashboard" at centos box.

Last edited by windstory; 11-09-2015 at 08:34 AM.
 
Old 11-09-2015, 09:03 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,516

Rep: Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436Reputation: 2436
so that worked perfectly. That means you have a firewall somewhere which will block that host - or you want to reach it from outside (as http://maestro.iptime.org) and you have a switch/router somewhere which has no idea how to handle the request.
In the first case you need to check your firewall settings in the second case you need to set up a port forwarding.
 
1 members found this post helpful.
Old 11-09-2015, 09:14 AM   #8
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Thanks a lot.

I delete port forward setting at internet sharing router.

Last edited by windstory; 11-09-2015 at 09:15 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Port 36991/TCP Open cabledude27 Linux - Security 1 11-14-2008 04:52 PM
How to open a TCP Port dludenar Linux - Networking 3 07-01-2006 06:15 AM
TCP port 603 open sharpie Linux - Security 6 04-21-2004 10:48 PM
How shoul I open a TCP port? chtthies Linux - Newbie 1 11-12-2003 04:50 PM
How to know some more about an open TCP port? yuzuohong Linux - General 1 05-12-2003 10:42 PM


All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration