Restricting Access to Directory Contents using Apache May 22, 2013
Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: alok srivastava, apache configuration, best redhat, best rhcss training in india, httpd.conf, limit directory access apache, networknuts, redhat delhi, redhat india, redhat linux rhce, redhat linux training, rhce training, RHCE TRAINING IN India, rhcss training
add a comment
Video by Network NUTS. Shows how you can configure Apache web server to share contents like files etc from some directory locations. Then it will show you how to take some directory “offline” for some maintenance work. Further it explain how to restrict access to directories based on IP. It will then cover how you can use URL based rules to limit access to certain directories. Lastly it demonstrate you how to block certain file types not to get published.
This is something they never taught in any official Linux Training.
GPG Keys. Send file to multiple recipients. May 15, 2013
Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: alok srivastava, best linux training institute, best linux training institute in india, best redhat training partner, gnupg, gpg keys, linux delhi, linux encryption, networknuts, redhat certification, redhat delhi, redhat india, redhat linux, redhat linux training, redhat training, rhce training, rhcss training in india
add a comment
GEEKS!!
If you remember your RHCE Training or RHCSS (RH333) Training you must be remembering how to use the GPG keys to encrypt and decrypt the files and send it to other recipients without being bothered about sharing the “password”.
Now here is a very small trick.
If you want to send one file to multiple recipients using GPG you can either execute the command -
gpg –encrypt –recipient nameofperson filename
multiple times and by replacing the nameofperson each time.
Other smart way can be that you can use a slightly smart version of GPG command -
gpg -r firstperson -r secondperson -r thirdperson –encrypt filename
In the second case, GPG will gpg will use the public key of all the recipients to encrypt the data and any one of their private keys can decrypt the data.
You just need to make sure that you have “imported” all the persons GPG keys before executing this command.
Save Storage Space use hardlinks May 9, 2013
Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: alok srivastava, hardlinks, linux training, networkntus, networknuts, redhat certification, redhat india, redhat training, remove duplicate files, rhce training, rhcss training, save harddisk space
add a comment
GEEKS !!
Consider this.
You suspect that there are some huge duplicated file (can be movies, songs) in your HDD. But its very difficult to scan each directory for “duplicate stuff”.
What to do?
Please welcome a tool - hardlinks.
This hardlinks is not same what you had learned during your RHCE Training.
It consolidate duplicate files via hardlinks. This is a package that automatically walks through files, on the same filesystem, looking for duplicates. When a duplicate is found, one file is chosen as the master and the other duplicate matches link to this
master.
Here is a small illustration of its working from my machine.
PS: If you edit the file with emacs, it will not save changes in both places. Because the default settings of emacs save the contents into a new file, you’ll only get the changes made in the file you’re editing. If you had made a soft link (ln -s), then, changing one file with emacs will change the other … just an important point
to note.
biosdecode May 8, 2013
Posted by networknuts in Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: alok srivastava, biosdecode, getting bios information, linux delhi, linux india, networknuts, redhat certification, redhat delhi, redhat india, redhat linux, redhat linux training, rhce training, rhcss training
add a comment
GEEKS !!
You can use “biosdecode” command to get information about your BIOS from the command prompt.
HDD & CPU Temperature May 6, 2013
Posted by networknuts in Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: alok srivastava, best redhat linux training in india, best training institute for redhat, cpu temperature in linux, hard disk temperature in linux, hddtemp, linux delhi, linux india, networknuts, redhat certification, redhat delhi, redhat india, redhat training, rhce certification, rhce training, rhcss training
add a comment
GEEKS !!
There is a very small but useful tool to monitor your CPU and HDD temperature. (not covered in official RHCE Training or RHCSS Training)
Can be very useful before you think of putting additional cooling devices.
You can use acpi -V for monitoring CPU temperature.
You can use hddtemp /dev/sda for monitoring HDD temperature.
Below is a small illustration from my machine.
Apache IP based Access May 4, 2013
Posted by networknuts in Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: alok srivastava, apache, best redhat linux training in india, best redhat training, ip based access apache, linux hacks, linux training in india, networknuts, redhat certifications, redhat delhi, redhat india, redhat linux training, rhce delhi, rhce india, rhce training, rhcss training, securing apache, securing apache directories
add a comment
GEEKS !!!
Here are some of the basics of restricting IP based access to directories in Apache i.e. /etc/httpd/conf/httpd.conf. I hope you still remember your RHCE Training.
Now these all 3 setting are the same.
10.0.0.0/255.0.0.0
10.0.0.0/8
10
But, this one is different
10.0.0.0/24 only allows 10.0.0.1 to 10.0.0.254
Here are some examples for your from /etc/httpd/conf/httpd.confÂ
<Directory /var/www/html/networknuts>
Order allow,deny
Allow from 10.0.0.0/8 # All 10.
Allow from 192.168.0.0/16 # All 192.168
Allow from 127 # All 127.
</Directory>
Here’s an example that only allows access to .html files
and nothing else for a particular directory.
<Directory “/var/www/html/networknuts/secured”>
Satisfy All
Order allow,deny
Deny from all
<Files *.html>
Order deny,allow
Allow from all
Satisfy Any
</Files>
</Directory>
GEEKS don’t forget to reload httpd with the following command.
/etc/init.d/httpd reload
Enjoy your Sunday.
Kerberos with Telnet and SSH May 1, 2013
Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: alok srivastava, best rhce training in india, best rhcss training in india, configuring kerberos, configuring ssh, configuring telnet, kerberos, krb5-telnet, networknuts, redhat certification, redhat delhi, redhat india, redhat linux, redhat linux training, rhce training, rhcss in delhi, RHCSS In India, rhcss training, ssh with kerberos, telnet with kerberos
add a comment
Video by Network NUTS. Shows how to integrate telnet with kerberos and ssh. Basic knowledge of kerberos working and configuration is appreciated. Integrating telnet and ssh with kerberos helps you secure the authentication mechanism used by kerberos and also allow password less authentication to ssh and telnet servers.
Connect with Alok Srivastava on facebook – http://www.facebook.com/alokaryan
Connect with Network NUTS facebook page – http://www.facebook.com/networknuts
Visit our official website – http:/www.networknuts.net
Read tips and tricks on our wordpress blog – http://www.networknuts.wordpress.com
libwrap dependency May 1, 2013
Posted by networknuts in Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: /etc/hosts.allow, /etc/hosts.deny, alok srivastava, best redhat linux training, best redhat training partner, egrep command, finding services dependent on libwrap, ldd command, libwrap, networknuts, redhat certification, redhat delhi, redhat india, redhat linux training, redhat training, rhce training, rhcss training, tcp wrappers
add a comment
GEEKS !!
Hope you still remember your RHCE Training and TCP Wrapper’s /etc/hosts.allow and /etc/hosts.deny files.
You have used these files to control those services those are “libwrap” dependent. You must be aware that TCP Wrapper can manage only those services which uses libwrap.so library files.
Yes you can use the “ldd” command to find out that whether a particular service can be managed via TCP Wrapper or not. But, this can be a very lengthy job if you intend to control number of services.
So the better way is to get the list of all the binaries / services those are dependent on “libwrap” and do it once.
GEEKS !! You can use the egrep command for this purpose.
Here is a small illustration from my machine. First ldd command showing the output for a single service and then I have used egrep to get a list of all the services using libwrap.
Check Users Login Activity April 27, 2013
Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: ac command, alok srivastava, best redhat training partner, best rhce institute, best training, check users login activity, linux accounting, linux training in india, networknuts, redhat certification, redhat delhi, redhat india, redhat training, rhce training, rhcss training
add a comment
GEEKS !!
Do you know that you can get a lot of information about users connect time to your Linux server using “ac” command.
Can be very useful in checking the authorized and non-authorized activity on your Linux server.
As per man pages of ac:
ac prints out a report of connect time (in hours) based on the logins/logouts in the current wtmp file. A total is also printed out.
Here is a small screenshot from my machine.
Checksum openssl April 24, 2013
Posted by networknuts in Indian Certified Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.Tags: alok srivastava, best linux trainin in india, cksum, data integrity, linux training india, md5sum, networknuts, openssl, redhat delhi, redhat india, redhat linux, redhat linux training, rhce certification, rhce training, rhcss certification, rhcss trianing
add a comment
GEEKS !!
I know, that you all know, how to use the checksum or hashes to check the integrity of your important files.
This is something you had already learned in your RHCE Training or RHCSS Training (specially RH333).
You all have used the openssl command or md5sum or cksum to generate the hash and check whether the data integrity is lost or not.
But sometimes reading the checksum can be a real pain for the eyes. So here is a very small feature with openssl that makes your eyes smile and making your job of reading checksum easy.
Just try using -c option while generating the checksum. It will separate the checksum with : so making it easy to read.
Here is a small illustration and comparison from my machine.





