Ubuntu - Open a port for listening (no ufw, firewalld, iptables running)

331 Views Asked by At

I am looking to have my Ubuntu 18.04 VM listening on port 25.

Currently, nestat shows the below;

root@prod-neptune1:~# netstat -lntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:6062          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:6162          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:5001          0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
udp        0      0 127.0.0.1:8125          0.0.0.0:*
udp        0      0 127.0.0.53:53           0.0.0.0:*
udp        0      0 192.168.242.75:68       0.0.0.0:*
udp        0      0 192.168.242.75:123      0.0.0.0:*
udp        0      0 127.0.0.1:123           0.0.0.0:*
udp        0      0 0.0.0.0:123             0.0.0.0:*
udp6       0      0 fe80::4ec:a1ff:feca:123 :::*
udp6       0      0 ::1:123                 :::*
udp6       0      0 :::123                  :::*

There is no port 25 in that list. the command "ss" confirms the same. I believe port 25 is not open/listening.

root@prod-neptune1:~# systemctl status iptables
Unit iptables.service could not be found.
root@prod-neptune1:~# systemctl status firewalld
Unit firewalld.service could not be found.
root@prod-neptune1:~# systemctl status ufw
● ufw.service - Uncomplicated firewall
   Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2023-10-02 16:27:56 AEDT; 22min ago
     Docs: man:ufw(8)
 Main PID: 402 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/ufw.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@prod-neptune1:~# ufw status
Status: inactive

I am unsure as to how to make port 25 open and listening. As shown above, 2 native firewall services are not running and one is running but inactive.

How do I make port 25 available Thanks in advance!

0

There are 0 best solutions below