0

I changed my network subnet from 192.168.1.0 to 10.10.10.0, but some rogue process is trying to hit port 9100 on 192.168.1.145

I have tried sudo lsof -n | grep TCP | grep 9100 with no luck.
I have also tried sudo netstat -nlpt | grep 192.168.1.145 without luck.
My conclusion is that this isn't working because of the fact that the connection is not being established.

Besides waitig for a complete search for the ip in all files (sudo grep -Ril -e ´192.168.1.145´ * 2>/dev/null) to finish, or setting up some sort of dummy nic/ or a nc and route to let it connect to, what else can I do to find the process causing this.

I have checked that cups is not installed.

Update

It turned out i had misread the IP and it was an old printer installed on a windows machine. uninstalling that fixed it

1 Answers1

0

Based on the answer(s) here: https://serverfault.com/a/352275/246640 (tip from the comments)

Running

while true;do
   ss dst 192.168.1.145 -ntap  '( dport = :9100 )' | grep 145;
   sleep 1; 
done

Will make sure to show only a line when a packet is sent to that IP and port...

This diverges from the linked answer in that it shows non-established connections instead of established connections.

To verify that it works:

Run this in a different terminal: curl 192.168.145:9100 it show up in the output:

State                  Recv-Q                Send-Q                               Local Address:Port                                 Peer Address:Port
SYN-SENT               0                     1                                     10.10.10.240:59494                               192.168.1.145:9100                users:(("curl",pid=25945,fd=3))