سلام
دستورات اجرا شده به شرح زیر هستند:
sudo netstat -plntu
nmap localhost
sudo netstat -tulpn
sudo ufw allow 515
sudo ufw allow printer
sudo ufw app list
sudo ufw allow from any to 192.168.1.1 port 515 proto tcp
netstat -anltp | grep "LISTEN"
sudo ufw disable
sudo ufw status
نتیجه اجرای دستورات اعلام شده از سوی شما به شرح زیر :
sudo netstat -nltup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:9050 0.0.0.0:* LISTEN 1208/tor
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 2083/smbd
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2083/smbd
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1642/dnsmasq
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 2729/cupsd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 1771/xinetd
tcp6 0 0 :::445 :::* LISTEN 2083/smbd
tcp6 0 0 :::139 :::* LISTEN 2083/smbd
tcp6 0 0 :::631 :::* LISTEN 2729/cupsd
udp 0 0 0.0.0.0:46256 0.0.0.0:* 687/avahi-daemon: r
udp 0 0 0.0.0.0:5353 0.0.0.0:* 687/avahi-daemon: r
udp 0 0 127.0.1.1:53 0.0.0.0:* 1642/dnsmasq
udp 0 0 0.0.0.0:68 0.0.0.0:* 1036/dhclient
udp 0 0 192.168.1.1:137 0.0.0.0:* 2061/nmbd
udp 0 0 192.168.1.1:137 0.0.0.0:* 2061/nmbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 2061/nmbd
udp 0 0 192.168.1.1:138 0.0.0.0:* 2061/nmbd
udp 0 0 192.168.1.1:138 0.0.0.0:* 2061/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 2061/nmbd
udp 0 0 0.0.0.0:631 0.0.0.0:* 2732/cups-browsed
udp6 0 0 :::5353 :::* 687/avahi-daemon: r
udp6 0 0 :::46407 :::* 687/avahi-daemon: r
**********************************************************************************************************************
iptables -L -n
iptables v1.6.0: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded
موفق باشید