Mac: How to see list of running network services? - macos

I am writing an application that needs to connect with a running network service on a Mac.
Problem is, I have no idea what the service is called or even what port it uses. Is there a way to browse all running network services on my Mac?
More info:
I am connecting to a MIDI network session (found under 'Audio MIDI settings', present on all OSX installs). Am I correct in thinking this is a network service?
I am planning to use NSNetServiceBrowser to locate all local computers running this service. (is this the best way to go about it?)
Any help is much appreciated - thanks!

From:
"...no idea what the service is called or
even what port it uses..."
try in terminal:
nc 192.168.1.30 1-9999
Replace 192.168.1.30 by your ip, and replace 1-9999 to the port range you want to scan. 1-9999 would mean scan from port 1 to 9999.
2. From:
"...network services on my Mac..."
Try Bonjour Browser.
http://www.tildesoft.com/
Just a humble suggestion.

The Network Utility found under Applications/Utilities has an option to Port Scan a host, running against localhost will show you what ports are open for connections.

Related

Cannot Access XAMPP Web Server From External Network

I currently have 4 websites running off my home desktop PC using XAMPP. They are running on ports 80, 81, 7733, and 25293.
The first three run fine when accessed from an external network, however the last (25293) won't load. (This site can't be reached. ERR_CONNECTION_FAILED)
I am port forwarding all 4 ports the exact same way. Just as soon as I'm not on my local network, the page stops loading.
I attempted to open up the port in my firewall as well however that achieved nothing. What can I do to resolve this?
The error I receive upon visiting the port on an external network:
This might be a common issue because you are using 5 digits port number, you may need port validation.
For example this was known issue for Drupal:
https://www.drupal.org/project/link/issues/182916
Are you running Linux, or Windows server?
Do you have another computer on the same network? If so, can that computer access your webserver? Try, because that must be your first step, then worry about being visible to the outside world.
I just saw this link and this one. Try to see if it solves your problem.

How would I go about port-forwarding on azure microsoft 2012 server [azure]

I'm being in a tough spot, having created 2 different virtual machines on Azure, with windows server 2012 R2 OS. I'm trying to host a game server for a game, which requires ports 7777 and 27015 opened.
What I did is simple, I went into the panel, set-up endpoints for 7777, 27015, for UDP and TCP, and added exceptions to firewall as well for incoming/outcoming 7777, 27015 TCP and UDP.
canyouseeme.org still apparently can't find my service and shows me the ports are not opened. It shows my remote connection port is opened though. What am I doing wrong? Is there anything more that I need to know?
Image showing forwarded ports
If you opened the ports on your Firewall and on the Endpoints screen you are probably fine to game. The problem is probably with the utility that you're testing with and not the ports themselves.
I logged onto an Azure VM that I know I can remotely connect to, tested an open port that I know is open with that website, and it said it did not find it. Maybe that site is using Ping, which gets stuck in Azure's load balancer. To test connectivity, try using PSPing. This will let you test connections to specific ports. https://technet.microsoft.com/en-us/sysinternals/bb896649

Red5 Problem with connecting from remote client

So I have this issue. The issue is I am unable to connect to my red5 server from a remote client. I also have not found any tutorials on how to install red5 so that remote clients can connect to it. However, here is what I have done...
Inside My MXML Flex File I try to connect to the computers IP that the server is running on(My Server is running from within Eclipse). The line for connecting looks like this netConnection.connect(rtmp://192.168.2.12/myApp, true);
All that happens is after a lot of minutes go by, I just get NetConnection.Connect.Failed and there is no log being output by Eclipse. Almost like it never even registers the connection that the remote client is trying to make.
The other interesting thing is that I am ABLE to connect to my Red5 Server using a different computer within my local home network just fine. But only when it is remote I am unable to connect.
I have changed my Red5-web.properties file and added this...
webapp.contextPath=/myApp
webapp.virtualHosts=*, 127.0.0.1, localhost, 192.168.2.14, 174.122.104.3
The 174 one is my website where the Flex Swf Resides on.
I think maybe somehow my computer is not setup or configured to allow these remote connections and is rejecting them or something, I'm not quite sure why a remote client can't connect. Does anyone have any idas?
Your help is greatly appreciated.
You may uninstall the red5 and reinstall it.
When it ask you the server ip address type your server's LAN adress (192.168.2.* or 10.0.0.* whatever). This solved my problem.
In my opinion, if you have at least one domain name that you own, the best way for you to go is to set up an Apache Http Server to your server machine, and create subdomains for both red5, rtmp and rtmpt. Make the Apache handle your incoming requests, and decide their correct routing there.
In case you don't own a domain, or the previous way is too time-taking to set up and get it work, you should just make sure that the ip address you're trying to connect to is not an internal IP.
In your example above you are trying to connect from the client to a 192.168... address. If you try to connect to it from within your LAN, it works, since that ip there is registered to your machine.
But when you take your notebook to your neighbor, and using his internet connection to access your site and connect to red5, the client (flex application) will also try to connect to that 192.168..., and your neighbor's router has no idea about your LAN, probably it doesn't have such an internal IP address either, but SURELY cannot connect to your server.
So instead of using 192.168... in your connection string, you should try using your external IP address (the 174... one):
netConnection.connect("rtmp://174.122.104.3/myApp", true);
This will work always, as far as you have a static IP address.
Also make sure, that your red5 server is accessible over the 80 port, or if it's not, specify the correct port number there.
For that you can do following thing...
These steps I took and it's solved my problem...
1.During the installation, you must have given ip 127.0.0.1 (localhost) and port :5080
2.firstly open the port (5080 and 1935) on firewall.
Visit http://windows.microsoft.com/en-in/windows/open-port-windows-firewall#1TC=windows-7
3.Now to go red5->conf->red5.properties and open this file in notepad++. (or any other editor)
4.repalce http.host and rtmp.host ip with your ip address (ipv4)
5.start the red5 service.
6.Now check http://yourip:5080
It will start working, and you can access it from other system also (in the same network Obviously )

Easiest way to implement a SMB redirector for Windows?

I would like to implement a little tool that lets me do on Windows what I can already do easily on any other OS - specify a remote SMB server by both IP address and port. Natively, Windows will not do SMB over any ports other than 445 or 139 (its choice), and I'm sick of playing whack-a-mole with workarounds for the various Bad Things that Microsoft keeps adding to Windows to fsck up tunnelling SMB over SSH port forwarding.
What I have in mind is a little command line app that would let me do something like
netsubst servername -i IP -p PORT
This would work hand in hand with a driver? dll? that hooks into Windows as an SMB redirector, but scans a table of server names set up by netsubst instead of looking them up on the network in order to find out what to connect to. So I'd be able to do
net use X: //servername/sharename /user:username *
in the usual way, except that instead of Windows looking for //servername on ports 445 or 139 of whatever machines it could find, it would go straight to address IP, port PORT; and if IP happened to be 127.0.0.1 and PORT happened to be something forwarded to somewhere else via ssh, it would All Just Work and I would no longer need to deal with the walls of stupid that Windows puts around access to localhost ports 139 and 445.
I figure what I need is something akin to the //vboxsvr guest addition that VirtualBox uses to do host file sharing, but probably rather simpler since it wouldn't need a full back end - in my ideal world, the only Windows functionality I'd need to replace is the part that establishes the initial connection to the remote SMB server. But before I start tearing into the VirtualBox source code, can somebody suggest an easier way to get this done, or perhaps point me to Microsoft documentation on implementing SMB redirectors?
\\server#port\share is a valid syntax for WebDAV. The moment you put the #port in the UNC path notation, net use changes from SMB to WebDAV. You cannot change the port SMB is using.
--Ben
Writing a driver is not easy; it requires a lot of domain specific knowledge. Here are some links to get started:
How to Write a Windows Driver
Develop a Windows Driver
WDK Documentation on MSDN
Good luck.
You might also find this (PDF) helpful.
You may need to implement a network redirector by yourself.
Looking TalAloni's SMBLibrary note and PcapDotNet , that can make some help.
net use * \\servername#XXXX\ where XXXX is a port number.
I've jast checked it on Windows 7. So it works perfect

How to check programmatically the OS of remote host?

I need to check if remote host is Windows or Unix/Linux.
I can't assume that it has web server configured.
All I can do is to try to connect to several TCP or UDP services.
Which TCP services (TCP port numbers) usually will be opened on Windows and not on Unix/Linux and vise versa?
The other way is to try to ssh to it, and if it fails assume that it Windows host. The problem is, that I need this in order to choose the remote access method ssh or something Windows friendly like psexec.
You can read the output of nmap to detect which OS a remote host is running. It has a whole module dedicated to this. Here is a guide to using it.
Why not just try to connect one way, and if that fails, connect the other way, and if neither work, tell the user?
If that's all you're trying to do, there's no need to actually check the OS.
This is not an easy thing to answer with any degree of certainty as there are very few ports that will always be open on one OS but not on another.
You could try some/all of the following
80 http obviously
22,23 Telnet and SSH (Not usually open on windows, one at least usually open on *nix)
135 Used by WMI so often open on windows
1443 (Possibly SQL Server)
691 Used by MS Exchange routing
3389 MS Remote Desktop
I would suggest that scanning ranges of ports may lead you into trouble particularly if these are not your machines. You may find your IP address logged as a possible source of "Port Scanners"
There are some fairly extensive lists of ports available on the web. e.g. http://keir.net/portlist.html

Resources