3

Samsung multi-functional device SXC 3205w works perfectly with my Ubuntu 12.04 and I can scan and print over network, but only when firewall is disabled.

How can I find out which port to enable in UFW to make this printer work and have my firewall enabled?

qbi
  • 19,545
Mike
  • 5,951

1 Answers1

2

You can use fallowing command to trace communication between pc and printer

sudo tcpdump -i interface | grep ip_address_of_printer

You will see output of network communication, protocol, port ...

After that you can set ufw

Another way is to use command

netstat -atu | grep ip_address_of_printer

With this command you will see active connection between pc and printer.

Also you can allow all trafic for printer ip address

sudo ufw allow from ip_address_of_printer
2707974
  • 10,758
  • After reboot, port of the device changed, so tcpdump and netstat is a short term solution, but it works, allowing an ip address looks more long term. – Mike Aug 05 '15 at 11:14
  • Thanks! That last command got mine to work. Didn't know about that option in ufw – Organic Marble Nov 09 '15 at 17:25