LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-12-2016, 05:18 AM   #16
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364

(ooops again, I was editing my post while you replied)

So, win can connect to client :22 ok, which 'points the finger' back at :80
I guess.... but, the ping guest->host not working is still strange...
(want to try forcing httpd to listen on IPV4 only? naw... bad-guess...)

Check the httpd logs, to make sure, among the localhost connects, it's not rejecting any from win...

Last edited by Jjanel; 10-12-2016 at 06:08 AM.
 
1 members found this post helpful.
Old 10-12-2016, 05:22 AM   #17
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Quote:
one thing on my windows doesn't allow tcp out connections
What?!? Can you 'browse the web' on both/either? (like yahoo.com)

Quote:
while my windows is 192.168.2.1
Hmmm... centos said gw is 192.168.2.2 !
Quote:
0.0.0.0 192.168.2.2 0.0.0.0 UG 0 0 0 eno16777736
Can guest ping 192.168.2.2 ? IF so, then the orig "can't ping win" is a mistake!
Did you look thru `netstat -rn` *on win*? Is a .2 there?

...but but but... ssh works fine... (time to sleep; hope another LQ'er comes to help)

Last edited by Jjanel; 10-12-2016 at 06:21 AM.
 
1 members found this post helpful.
Old 10-12-2016, 01:26 PM   #18
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
On your 1st post below, you said

Quote:
Originally Posted by Fardad74 View Post
Hello friends.
I installed httpd server package in my centos7 on vmware and i wanted test it to see apache default page from windows using browser
(e.g: http://192.168.1.128). I configed both vm and windows vmnet8 to get an automatic dhcp ip addresses. now my centos have 192.168.1.128 and windows vmnet8 have 192.168.1.1.

While your screen shot was showing 192.168.2.128 (which I assume is /24).
On one post you said Windows is on 192.168.1.x/24. On the other post, it was on 192.168.2.x/24. Which can confuse people.

Can you please browse from Windows using that 192.168.2.128 instead? Windows can't see that IP without some routing trickery.
httpd seems to be listening on all interfaces, that's good.

I'm not a VMWare user, but you need to make sure that they belong to the same "VLAN" (or Internal network in Virtualbox) AND residing on the same subnet

Hope this helps.
I'm not a VMWare user, but you need to make sure that they belong to the same "VLAN" (or Internal network in Virtualbox) AND residing on the same subnet

Hope this helps.

Last edited by c0wb0y; 10-12-2016 at 01:34 PM.
 
1 members found this post helpful.
Old 10-12-2016, 01:44 PM   #19
Fardad74
Member
 
Registered: Jan 2016
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by c0wb0y View Post
On your 1st post below, you said



While your screen shot was showing 192.168.2.128 (which I assume is /24).
On one post you said Windows is on 192.168.1.x/24. On the other post, it was on 192.168.2.x/24. Which can confuse people.

Can you please browse from Windows using that 192.168.2.128 instead? Windows can't see that IP without some routing trickery.
httpd seems to be listening on all interfaces, that's good.

I'm not a VMWare user, but you need to make sure that they belong to the same "VLAN" (or Internal network in Virtualbox) AND residing on the same subnet

Hope this helps.
I'm not a VMWare user, but you need to make sure that they belong to the same "VLAN" (or Internal network in Virtualbox) AND residing on the same subnet

Hope this helps.
No my friend, after with 192.168.1.x/24 subnet didn't made me successfull then i changed the subnet to 192.168.2.x/24 , thanks for telling , i forget to say that .
but other things remained same.
 
Old 10-12-2016, 01:57 PM   #20
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
Thanks for clearing that up.

Before we move up on the OSI layer, we need to make sure that we can establish IP connectivity first. Do you still having issues pinging each other (firewall disabled for now)?

try this:

Code:
tcpdump -tni <Centos-interface>
it will at least spit any ARP outputs can you can check against Windows MAC.

then ping from Windows.
 
1 members found this post helpful.
Old 10-12-2016, 02:05 PM   #21
Fardad74
Member
 
Registered: Jan 2016
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Question

Quote:
Originally Posted by Jjanel View Post
What?!? Can you 'browse the web' on both/either? (like yahoo.com)


Hmmm... centos said gw is 192.168.2.2 !

Can guest ping 192.168.2.2 ? IF so, then the orig "can't ping win" is a mistake!
Did you look thru `netstat -rn` *on win*? Is a .2 there?

...but but but... ssh works fine... (time to sleep; hope another LQ'er comes to help)
ssh works fine - i had a successful ping to 192.168.2.2 from centos!!! it's interesting!! but it can't ping 2.1 that is ip address of windows! i think it's a rare problem, even i'm telling to my friend this problem online , his brain is exploding!
every other thing is ok , custom page (This is fardad!) , httpd - netstat shows listening - dhclient -r to release ip - i have see that page on my centos firefox with typing http://192.168.2.128 ----> it confirms that everything on my vm centos is ok such as html page , httpd connectivity and so on . just it seems centos don't allow ping to windows, is this problem because of firewall problems?? such as iptables or selinux with " setenforce 0 " command(my friend told do that command but service iptables said it's not loaded)
 
Old 10-12-2016, 02:08 PM   #22
Fardad74
Member
 
Registered: Jan 2016
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by Jjanel View Post
What?!? Can you 'browse the web' on both/either? (like yahoo.com)


Hmmm... centos said gw is 192.168.2.2 !

Can guest ping 192.168.2.2 ? IF so, then the orig "can't ping win" is a mistake!
Did you look thru `netstat -rn` *on win*? Is a .2 there?

...but but but... ssh works fine... (time to sleep; hope another LQ'er comes to help)
yes yes i have full access to all sites
 
Old 10-12-2016, 02:13 PM   #23
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
That's why tcpdump was suggested so you can tell if anything is hitting your CentOS server from outside. Gateway is irrelevant at this stage as nodes are on the same subnet.

Can you please post output of:

tcpdump output
iptables -nvL
getenforce
ss -4tlna
 
1 members found this post helpful.
Old 10-12-2016, 02:19 PM   #24
Fardad74
Member
 
Registered: Jan 2016
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Post

Quote:
Originally Posted by c0wb0y View Post
That's why tcpdump was suggested so you can tell if anything is hitting your CentOS server from outside. Gateway is irrelevant at this stage as nodes are on the same subnet.

Can you please post output of:

tcpdump output
iptables -nvL
getenforce
ss -4tlna
tcpdump output:

[root@localhost ~]# tcpdump -tni eno16777736
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eno16777736, link-type EN10MB (Ethernet), capture size 65535 bytes
IP 192.168.2.128.34779 > 5.160.24.41.ntp: NTPv4, Client, length 48
ARP, Request who-has 192.168.2.128 tell 192.168.2.2, length 46
ARP, Reply 192.168.2.128 is-at 00:0c:29:89:c9:ea, length 28
IP 5.160.24.41.ntp > 192.168.2.128.34779: NTPv4, Server, length 48
IP 192.168.2.128.60982 > 46.209.15.97.ntp: NTPv4, Client, length 48
IP 46.209.15.97.ntp > 192.168.2.128.60982: NTPv4, Server, length 48
IP 192.168.2.128.53133 > 194.225.50.25.ntp: NTPv4, Client, length 48
IP 194.225.50.25.ntp > 192.168.2.128.53133: NTPv4, Server, length 48
IP 192.168.2.128.42619 > 5.160.24.33.ntp: NTPv4, Client, length 48
IP 5.160.24.33.ntp > 192.168.2.128.42619: NTPv4, Server, length 48
ARP, Request who-has 192.168.2.2 tell 192.168.2.128, length 28
ARP, Reply 192.168.2.2 is-at 00:50:56:f3:8d:b5, length 46
IP 192.168.2.128.46304 > 5.160.24.41.ntp: NTPv4, Client, length 48
IP 5.160.24.41.ntp > 192.168.2.128.46304: NTPv4, Server, length 48
IP 192.168.2.128.47712 > 46.209.15.97.ntp: NTPv4, Client, length 48
IP 46.209.15.97.ntp > 192.168.2.128.47712: NTPv4, Server, length 48
IP 192.168.2.128.57427 > 194.225.50.25.ntp: NTPv4, Client, length 48
IP 194.225.50.25.ntp > 192.168.2.128.57427: NTPv4, Server, length 48
ARP, Request who-has 192.168.2.2 tell 192.168.2.128, length 28
ARP, Reply 192.168.2.2 is-at 00:50:56:f3:8d:b5, length 46

ss output:

ss output:

[root@localhost ~]# man ss
[root@localhost ~]# ss -4tlna
State Recv-Q Send-Q
Local Address:Port Peer Address:Port
LISTEN 0 5
192.168.122.1:53 *:*
LISTEN 0 128
*:22 *:*
LISTEN 0 128
127.0.0.1:631 *:*
LISTEN 0 100
127.0.0.1:25 *:*

Last edited by Fardad74; 10-12-2016 at 02:36 PM.
 
Old 10-12-2016, 02:39 PM   #25
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
2.2 (which is Windows IP, right?) seems to be doing ARP request, that's good.

ss output shows no httpd listening there. Is httpd really running? Start it up, then verify. Then keep tcpdump running but modify that options so that you don't get irrelevant output:

tcpdump -tni eno16777736 host 192.168.2.128 and dst port 80

Optionally, you can open another terminal and do a live watch

watch ss -4tlna

Now, it's time to check your httpd logs as well. This can be done realtime as well. I'll leave it up to you to figure it out.
 
1 members found this post helpful.
Old 10-12-2016, 03:01 PM   #26
Fardad74
Member
 
Registered: Jan 2016
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by c0wb0y View Post
2.2 (which is Windows IP, right?) seems to be doing ARP request, that's good.

ss output shows no httpd listening there. Is httpd really running? Start it up, then verify. Then keep tcpdump running but modify that options so that you don't get irrelevant output:

tcpdump -tni eno16777736 host 192.168.2.128 and dst port 80

Optionally, you can open another terminal and do a live watch

watch ss -4tlna

Now, it's time to check your httpd logs as well. This can be done realtime as well. I'll leave it up to you to figure it out.
no not 2.2 , 192.168.2.1 is vmnet8 ip address on windows that my centos using same vmnet8, too. also on windows D-link wireless interface have 192.168.1.x/24 ip address. is this problem?

[root@localhost ~]# service httpd status
Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2016-10-12 23:27:37 IRST; 8min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 6668 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Main PID: 6746 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─6746 /usr/sbin/httpd -DFOREGROUND
├─6747 /usr/sbin/httpd -DFOREGROUND
├─6748 /usr/sbin/httpd -DFOREGROUND
├─6749 /usr/sbin/httpd -DFOREGROUND
├─6750 /usr/sbin/httpd -DFOREGROUND
└─6751 /usr/sbin/httpd -DFOREGROUND

Oct 12 23:27:36 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Oct 12 23:27:37 localhost.localdomain httpd[6746]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, us...message
Oct 12 23:27:37 localhost.localdomain systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.

Last edited by Fardad74; 10-12-2016 at 03:07 PM.
 
Old 10-12-2016, 03:07 PM   #27
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
If you want to resolve your issues, please provide information not in a piecemeal manner. I would suggest provide IPs in bulleted/tabular form.

Ok, so tcpdump is not showing any signs of Windows (2.1) communicating with CentOS (2.128). You still haven't confirmed if they are on the same virtual switch. You did not provide any indication that httpd is indeed running. You have too many tools at your disposal to get those. No sign of ping being attempted from Windows to Centos.
 
1 members found this post helpful.
Old 10-12-2016, 03:11 PM   #28
Fardad74
Member
 
Registered: Jan 2016
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
yes yes still ss -4tla output doesn't show http port 80 , i think this is the problem ,i seems my centos firewall doesn't allow http port 80 to listenning but netstat -npl showing httpd is listening on port 80!!! it's so strange :

[root@localhost ~]# netstat -nlpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 3095/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1770/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1773/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2935/master
tcp6 0 0 :::80 :::* LISTEN 6746/httpd
tcp6 0 0 :::22 :::* LISTEN 1770/sshd
tcp6 0 0 ::1:631 :::* LISTEN 1773/cupsd
tcp6 0 0 ::1:25 :::* LISTEN 2935/master
 
Old 10-12-2016, 03:22 PM   #29
Fardad74
Member
 
Registered: Jan 2016
Posts: 50

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Yes , they are on same vmnet8 switch , and they are on same subnet that i told earlier .
Attached Thumbnails
Click image for larger version

Name:	Screenshot (11).png
Views:	42
Size:	95.7 KB
ID:	23227  
 
Old 10-12-2016, 03:24 PM   #30
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
Sorry it's my bad, ss won't show ipv6 connection without explicitly telling it like

ss -46tlna


Now, I want you to confirm they are in the same virtual switch, check IP/subnet mask. You can forget about default gateway/DNS for now. Selinux off for now. Let tcpdump running, tail the output of httpd, then ping from Windows AND browse from there
 
1 members found this post helpful.
  


Reply

Tags
apache, httpd server, server



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
Virtual server only brings up default Apache page \/4A Linux - Server 2 12-29-2014 03:02 AM
web page on apache server query a MS Access database chackercon Programming 2 01-19-2010 10:22 AM
apache web server default page link tuxrules Linux - Newbie 9 07-10-2004 05:22 PM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:12 PM.

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
Open Source Consulting | Domain Registration