Jump to content

(linux) log all connection attempts at a port to file on the desktop?

34 minutes ago, Electronics Wizardy said:

What distro? Normall do this in your firewall.

Linux Mint

 

24 minutes ago, Name Taken said:

iptables -I INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -j LOG --log-level warning

will log new connections to a port to syslog then


echo "kern.warning /home/user/Desktop/custom.log" >> /etc/rsyslog.d/60-custom.conf

syslog will write to your desktop.

hmmm ran into some errors, will look into those 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Electronics Wizardy said:

what firewall are you using?

just the default one.

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

20 minutes ago, Electronics Wizardy said:

which one?

Gufw

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×