Summary


IP/Services lists the protocols and ports used by various MikroTik RouterOS services and containers, including those for incoming connections.

It helps to determine which MikroTik services (or containers) are listening on specific ports, and what needs to be blocked or allowed if you want to restrict or permit access to certain services.

The default services that can be configured from IP/Services section:

PropertyDescription
telnetTelnet service
ftpFTP service
wwwWebFig HTTP service
sshSSH service
www-sslWebFig HTTPS service
apiAPI service
winboxResponsible for WinBox tool access, as well as MikroTik smartphone app and Dude
api-sslAPI over SSL service

Properties


Note that it is not possible to add new services, only existing service modifications are allowed.

Sub-menu: /ip service

PropertyDescription
address (IP address/netmask | IPv6/0..128; Default: )

List of IP/IPv6 prefixes from which the service is accessible. When this parameter is set, packets are not dropped at the network level, but access to the service is denied for sources not matching the specified addresses.
This option is best suited for restricting access within trusted networks.

To block access from external or untrusted networks, we recommend using a Firewall instead.

certificate (name; Default: none)The name of the certificate used by a particular service. Applicable only for services that depend on certificates (www-ssl, api-ssl)
name (name; Default: none)Service name
max-sessions  (integer: 1..1000; Default: 20)Max simultaneous session count for service
port (integer: 1..65535; Default: )The port particular service listens on
tls-version (any | only-1.2; Default: any)Specifies which TLS versions to allow by a particular service
vrf (name; Default: main)Specify which VRF instance to use by a particular service

Read-only properties

PropertyDescription
ContainerName of the container listening on the port
LocalRouter local address used for the connection
RemoteRemote address that established the connection to the service

Example

For example, allow API only from a specific IP/IPv6 address range

[admin@dzeltenais_burkaans] /ip/service/set api address=10.5.101.0/24,2001:db8:fade::/64
[admin@dzeltenais_burkaans] /ip/service/print where !dynamic      
Flags: X - DISABLED, I - INVALID
Columns: NAME, PORT, PROTO, ADDRESS, CERTIFICATE, VRF, MAX-SESSIONS
 #   NAME     PORT  PROTO  ADDRESS             CERTIFICATE  VRF   MAX-SESSIONS
 0   ftp        21  tcp                                     main            20
 1   ssh        22  tcp                                     main            20
 2   telnet     23  tcp                                     main            20
 7   www        80  tcp                                     main            20
 9 X www-ssl   443  tcp                        none         main            20
13   winbox   8291  tcp                                     main            20
15   api      8728  tcp    10.5.101.0/24                    main            20
                           2001:db8:fade::/64                                 
16   api-ssl  8729  tcp                        none         main            20

Example that shows dynamic services that listens or has establish connections to router services

[admin@dzeltenais_burkaans] /ip/service/print where dynamic  
Flags: D - DYNAMIC; c - CONNECTION
Columns: NAME, NETNS, CONTAINER, PORT, PROTO, LOCAL, REMOTE
 #    NAME        NETNS  CONTAINER  PORT  PROTO  LOCAL         REMOTE            
 3 D  resolver                        53  tcp                                    
 4 D  resolver                        53  udp                                    
 5 D  dhcp                            67  udp                                    
 6 D  dhcpclient                      68  udp                                    
 8 D  snmp                           161  udp                                    
10 D  btest                         2000  tcp                                    
11 D  loader                        3986  tcp                                    
12 D  discover                      5678  udp                                    
14 Dc winbox                        8291  tcp    10.155.221.4  10.145.221.15:51595
17 D  pihole-FTL     16  Pi-hole      53  tcp                                    
18 D  pihole-FTL     16  Pi-hole      53  udp                                    
19 D  lighttpd       16  Pi-hole      80  tcp                                    
28 Dc lighttpd       16  Pi-hole      80  tcp    172.55.1.2    10.145.221.15:52298
29 Dc lighttpd       16  Pi-hole      80  tcp    172.55.1.2    10.145.221.15:52333
30 Dc lighttpd       16  Pi-hole      80  tcp    172.55.1.2    10.145.221.15:52339
31 Dc lighttpd       16  Pi-hole      80  tcp    172.55.1.2    10.145.221.15:52340
32 Dc lighttpd       16  Pi-hole      80  tcp    172.55.1.2    10.145.221.15:52341
33 Dc lighttpd       16  Pi-hole      80  tcp    172.55.1.2    10.145.221.15:52342
26 D  pihole-FTL     16  Pi-hole    4711  tcp


Protocols and ports


The table below shows the list of protocols and ports used by RouterOS.

Proto/PortDescription
20/tcpFTP data connection
21/tcpFTP control connection
22/tcpSecure Shell (SSH) remote login protocol
23/tcpTelnet protocol
53/tcp
53/udp
DNS
67/udpBootstrap protocol or DHCP Server
68/udpBootstrap protocol or DHCP Client
80/tcpWorld Wide Web HTTP
123/udpNetwork Time Protocol (NTP)
161/udpSimple Network Management Protocol (SNMP)
179/tcpBorder Gateway Protocol (BGP)
443/tcpSecure Socket Layer (SSL) encrypted HTTP
500/udpInternet Key Exchange (IKE) protocol
520/udp
521/udp
RIP routing protocol
546/udpDHCPv6 Client message
547/udpDHCPv6 Server message
646/tcpLDP transport session
646/udpLDP hello protocol
1080/tcpSOCKS proxy protocol
1698/udp 1699/udpRSVP TE Tunnels
1701/udpLayer 2 Tunnel Protocol (L2TP)
1723/tcpPoint-To-Point Tunneling Protocol (PPTP)
1900/udp
2828/tcp
Universal Plug and Play (uPnP)
1966/udpMME originator message traffic
1966/tcpMME gateway protocol
2000/tcpBandwidth test server
5246,5247/udpCAPsMAN
5350/udpNAT-PMP client
5351/udpNAT-PMP server
5678/udpMikrotik Neighbor Discovery Protocol
6343/tcpDefault OpenFlow port
8080/tcpHTTP Web Proxy
8291/tcpWinbox
8728/tcpAPI
8729/tcpAPI-SSL
20561/udpMAC winbox
/1ICMP
/2Multicast | IGMP
/4IPIP encapsulation
/41IPv6 (encapsulation)
/46RSVP TE tunnels
/47General Routing Encapsulation (GRE) - used for PPTP and EoIP tunnels
/50Encapsulating Security Payload for IPv4 (ESP)
/51Authentication Header for IPv4 (AH)
/89OSPF routing protocol
/103Multicast | PIM
/112VRRP
  • No labels