this post was submitted on 05 Jan 2024
23 points (89.7% liked)
Linux
48143 readers
788 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The better solution:
sudo apt-get install auditd
Set up watch:
sudo auditctl -w /path/to/your/file -p wa -k file_change_monitor
Check log:
sudo ausearch -k file_change_monitor
Alternative solution:
If you know the file that is being edited you can set up watches with
inotifywait
and log it to a file. This may possibly not work because lsof might not be quick enough.sudo apt-get install inotify-tools
then put this script in autostart
Don't forget to modify the values at the top of the script and make it executable.
They aren't asking about changes to a file describing the routing config, rather the actual in-use routing config. Unless the routing rules are modified through a couple of files (which I doubt), this doesn't answer the question.
Cool commands though.
My bad, I thought in Linux everything is a file
Well, the routes might manifest somewhere as files, but I don't expect anyone to be able to viably parse them without commands like
ip
orifconfig
(or know where the files even are).Some devices (like disks for example) are very straightforward to use as files, while some other special files (like USB devices) are so weird/ugly to use that everyone uses tools/libraries to access them (like libusb).
This is very off-topic, but there's a great talk by Benno Rice that talks about this (among many others): https://youtu.be/9-IWMbJXoLM
Thank you for the info and I'll listen to that talk
Here is an alternative Piped link(s):
https://piped.video/9-IWMbJXoLM
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I'm open-source; check me out at GitHub.
Bad bot