1

I need a way to Identify a windows SBS server, I have a script that mounts a file share on a SBS server, I need the script to positivity identify the server before mounting. It doesn't need to be secure,

My setup is like this :

My machine is on 192.168.5.17, the server is on 192.168.0.3, Because were on different subnets I cannot simply check the arp table for the machines mac address.

running Nmap against the server reveals these open ports

Starting Nmap 6.00 ( http://nmap.org ) at 2012-08-01 09:01 BST
Nmap scan report for host.somewhere.local (192.168.0.3)
Host is up (0.12s latency).
Not shown: 979 closed ports
PORT      STATE SERVICE
21/tcp    open  ftp
80/tcp    open  http
119/tcp   open  nntp
135/tcp   open  msrpc
139/tcp   open  netbios-ssn
443/tcp   open  https
445/tcp   open  microsoft-ds
563/tcp   open  snews
1025/tcp  open  NFS-or-IIS
2002/tcp  open  globe
2301/tcp  open  compaqdiag
2381/tcp  open  compaq-https
2910/tcp  open  tdaccess
3389/tcp  open  ms-wbt-server
4443/tcp  open  pharos
6129/tcp  open  unknown
8192/tcp  open  sophos
8193/tcp  open  sophos
8194/tcp  open  sophos
9000/tcp  open  cslistener
10000/tcp open  snet-sensor-mgmt

Nmap done: 1 IP address (1 host up) scanned in 20.70 seconds

The Nmap results show

Nmap scan report for host.somewhere.local (192.168.0.3)

How did it reslove the name i've tried dig and host but cannot get the name from the IP

The machine runs https can I somwhow check the cert from a bash script? Or is their another way to check the host is actually who I expect it to be?

Thanks.

2
  • "I need the script to positively identify the server before mounting. It doesn't need to be secure." Isn't that rather a tautology? Commented Jan 17, 2019 at 21:04
  • 1
    @roaima thanks I don't know what 6 year ago me was asking for. However my life turned out fine without it.
    – squareborg
    Commented Jan 21, 2019 at 21:48

1 Answer 1

1

Verifying the https-certificate is propably the best idea. IP, MAC and Names can be easyly spoofed.

Look at curl to check https. You need to provide it with the public CA-certificate, too. As far as I remember the default is that it will deny download if the server-certificate does not match the CA.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .