LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-22-2017, 06:08 AM   #1
DaleCooper
LQ Newbie
 
Registered: Sep 2017
Posts: 2

Rep: Reputation: Disabled
CENTOS:Problems accesing to a remote machine port


I was trying to access to a specified port of remote machine from my CENTOS machine and i am not able to connect.

If i write telnet remote_machine 666 i have no response.

The client machine is a vmware virtual machine where where the firewalld and iptables are stopped.

In the same vmware server i have another virtual machine (this one in ubuntu), that is able to connect to 666 port of remote machine.

Another curious things are that:

With a nmap, from ubuntu machine i can see remote 666 port as open, while from CENTOS machine 666 port is filtered.
In vmware client i can see ubuntu network adapter type(where it works) is defined as flexible while CENTOS one is defined as VMXNET 3
What could happen?
 
Old 09-22-2017, 11:05 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
On the client machine what does "lsof -i :666" show?

I'm thinking that 666 is LISTENing only on localhost and/or some bridge interface accessible to other VMs on same hypervisor but not to machines not on the same hypervisor.

You might want to use netcat (nc) rather than telnet for testing. A lot of distros these days aren't installing the telnet command (not to be confused with the telnet service).

nc -vw2 <remote> 666
Verbosely tries to connect to the remote you specify on port 666 and times out in 2 seconds. Running "man nc" will give you more details. You can even use nc to LISTEN on a port on one side and connect to it from another system to verify firewall settings before the app that will ultimately LISTEN on that port gets installed.
 
Old 09-25-2017, 02:54 AM   #3
DaleCooper
LQ Newbie
 
Registered: Sep 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
In both client machines lsof command returns nothing.

The nc command in ubuntu client works fine, but in CENTOS returns the message: 'Ncat: Connection timed out.'

It is a bit strange, because in this second machine when i launch the command:

nmap remote_machine -Pn -vv -p 666

it returns me:

PORT STATE SERVICE
666/tcp filtered unknown

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 2.05 seconds
Raw packets sent: 2 (88B) | Rcvd: 0 (0B)
 
Old 09-25-2017, 11:04 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
filtered/unknown basically just means it couldn't reach the port and doesn't know why.

The fact "lsof" didn't show anything LISTENing on port 666 on the server suggests the app that should be LISTENing isn't running. You could run "netstat -an |grep 666" on that same server to see. (Some things do not show up in lsof such as RPC stuff on some platforms but for the most part lsof should show things.)
 
  


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 not accessible from remote machine harshildesai Linux - Server 1 07-17-2009 10:56 AM
problems accesing serial port atish Programming 1 07-03-2007 11:16 AM
Is there any way I can test a port on a remote machine to see whether its open? neocookie Linux - Networking 3 05-09-2007 06:13 PM
Problems accesing Gnome via remote terminal guarriman Linux - General 3 02-22-2005 10:21 AM
Forwarding ONE port to remote machine supertrout Linux - Networking 2 12-14-2004 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:56 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