User Tools

Site Tools


samba_ports_usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

samba_ports_usage [2015/06/29 12:10] (current)
Line 1: Line 1:
 +**Samba ports usage**
 +
 +====== Introduction ======
 +
 +If you require to secure your Samba installation with a firewall, you would need information,​ what ports and protocols are used. This page will give you an overview.
 +
 +
 +====== Identify on which ports and interfaces Samba is listening ​ ======
 +----
 +
 +You can use "​netstat"​ to identify which ports Samba and related daemons are listening on and on which IPs:
 +<​code>​
 + # netstat -tulpn | egrep "​samba|smbd|nmbd|winbind"​
 +</​code>​
 +
 +The following is a snippet of an example output:
 +<​code>​
 + ​tcp ​       0      0 127.0.0.1:​139 ​              ​0.0.0.0:​* ​                  ​LISTEN ​     43270/smbd
 + ​tcp ​       0      0 10.0.0.1:​139 ​               0.0.0.0:​* ​                  ​LISTEN ​     43270/smbd
 + ​tcp ​       0      0 10.0.0.1:​88 ​                ​0.0.0.0:​* ​                  ​LISTEN ​     43273/samba
 + ​tcp ​       0      0 127.0.0.1:​88 ​               0.0.0.0:​* ​                  ​LISTEN ​     43273/samba
 + ​tcp ​       0      0 127.0.0.1:​445 ​              ​0.0.0.0:​* ​                  ​LISTEN ​     43270/smbd
 + ​tcp ​       0      0 10.12.112.84:​445 ​           0.0.0.0:​* ​                  ​LISTEN ​     43270/smbd
 +.....
 +</​code>​
 +
 +The above example shows, that the services are listening on localhost (127.0.0.1) and the interface with IP 10.12.112.84 - each on the listed ports (139, 88, 445,...).
 +
 +====== Port usage when Samba runs as DC ======
 +----
 +
 +{{ :​samba4_ports_usage.png?​450 |}}
 +
 +//* Samba, like Windows, supports dynamic RPC services. The range starts at 1024. If something occupies this port for some reason, it will be a different port (literally walked up from 1024).
 +//
 +
 +
 +
  
samba_ports_usage.txt ยท Last modified: 2015/06/29 12:10 (external edit)