TransWikia.com

How can I listen to port creation events on a network interface?

Unix & Linux Asked by PoultryMan on January 2, 2021

I would like to create a TUN interface (following this tutorial) that takes specific actions when a listening port is created on it. Those include logging the application that created the port, which port was created and to setup iptables rules to redirect traffic to specific interfaces and/or applications.

My guess would be that I can monitor a directory somewhere on /proc or /sys but I can’t find out which one.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP