LQ Suggestions & FeedbackDo you have a suggestion for this site or an idea that will make the site better? This forum is for you.
PLEASE READ THIS FORUM - Information and status updates will also be posted here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What I would like is a bash obfuscator function (maybe sed based) for networking information. If the IP address is private (e.g 10.x, 172.x, 192.x) then leave it alone. No problem. If the IP address is non-private then obfuscate with an identifier (IP-ADDRESS-01, IP-ADDRESS-02) so if we had to read the routes/interfaces, it would make sense while not damaging privacy.
Ideas?
Last edited by szboardstretcher; 01-04-2017 at 10:14 PM.
*LOVE* your idea of contributing LQdebug, for posters to collect 'essential' info.
Trying it on Void7.1 VBox (XP netbook host). cf myBlog VBox Networking
sh ldebug.sh (skipped chmod; thinking -vx). Oh I see: (make EXAMPLE -n [?])
-n Works great! A bit overly-verbose. *Does it work if no `ip` cmd eg Vector?
-s Ditto. Summary?: lsblk -fp;df -Th `mount|grep ^/|cut -f1 -d' '` ; -l ok/none
-f OOOPS! I don't have: systemctl service firewall-cmd iptables! I need -f! ufw?
-g ok but I'd suggest more: maybe: #procs; top; ...TBD. inxi? No: +X11=+100MB!
-H ok. I don't have lsusb; rare issue. Is lsmod 'that' useful? lspci -k ?
AntiX-16core wget wouldn't work without: --no-check-certificate
2nd IPTABLES ### worked, but 1st said: iptables: unrecognized service
-l: all 4 cmds not found.
-p pkg mgr TBD! -i? info on which type of init 'system'? &configs/services? (runlevel n/a?)
I can try other distros if you PM me. I'll *edit*in updates to this post, so as not to clutter thread. (suse; Manjaro=arch? Mandriva? bsd? puppy? android? tc/dsl? gentoo? 4M? LFS?
If the IP address is non-private then obfuscate with an identifier (IP-ADDRESS-01, IP-ADDRESS-02) so if we had to read the routes/interfaces, it would make sense while not damaging privacy.
Ideas?
firewall output may be "sensitive"?
firewalld required for iptables-type 'dump'?
"systemctl: not found", so systemd?
Code:
cat /proc/1/comm
Lemme spin up another "recent" VM and dork around.
Most of my assets are Virtual and very few actual systems. Well, that is what I 'do'.
#IhazVariants
As I've been writing this, in Centos 7, I've wondered often if it would be best to stick to /proc/ directory output rather than relying on tools that might or might not be available in non-Rhel/Debian distributions.
I just run this script on my gentoo system and everything worked except the firewall calls as i'm not running systemctl or firewalld on this system.
Code:
# ./ldebug -fZ
./ldebug: line 97: systemctl: command not found
./ldebug: line 100: systemctl: command not found
./ldebug: line 101: firewall-cmd: command not found
./ldebug: line 105: firewall-cmd: command not found
Maybe if you could run some sort of check for this before looking for the firewall setup so that the correct commands are run.
1) Not going to check for commands. You can infer a lot from missing commands. Its good information.
2) I mentioned that I am writing this in Centos. Not gentoo. If you want a command added that you think would help, offer it up, or create a pull request on github.
Since this thread has grown beyond the original question. Thank you for your interest in this pet project. PLEASE think about contributing your expertise to the script on Github. It would be great to have a few LQ members that are interested in the project actually team up on Github to help.
I've got to a great start, anyone can contribute via pull requests. Look forward to your input.
Change IPTABLES STATUS to IPTABLES_STATUS (4 of these), because output takes only 1 (1st) %s.
I just realized how this can be used by someone with no internet working
and/or minimal experience (no wget), wondering 'what debug-info to post?':
simply the link to the source can be given, as a research suggestion!
"Spend a few minutes looking at the get_...() functions here; web-search: man <cmd>"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.