Friday, July 17, 2009
Nmap5 RPMs
Just built RPMs of Nmap 5, have always been wanting to work on RPM building.
If you are interested in checking them out, get them from the below links.
nmap-5.00-1.i586.rpm
zenmap-5.00-1.noarch.rpm
ncat-5.00-1.i586.rpm
nmap-debuginfo-5.00-1.i586.rpm
Built them on my F11 box without any changes etc. to my current setup, not sure if that's how it should be done, still not very good at this rpmbuild stuff. Hope they are working.
Used "rpmdevtools" to setup the rpm build env. and followed this in setting it up.
Update: The official RPMs are here.
Thursday, June 18, 2009
wget stuff
note to self
RHN doesn't seem to play well with download managers. "wget" used to be good but noticed a small problem lately. When wget -c is given to resume a download, it starts to download things from scratch. This probably has something to do with the expiring urls that are given on RHN.
Renaming the old file part to the new one you can identify from the new download URL will work in this. Still not sure what's causing this, but remember quite well "wget" that wget didn't have this file-name problem earlier.
Thursday, June 11, 2009
simple awk usage
note to self
Once again, something i can't seem to hold in my mind, and end up searching for it over and over.
Awk can be used in this way to filter out a field from a text file when the separator is a " " ( WHITE SPACE )
awk '{ print $n}'
$n - is the field/column number
This can also be used in many other things for example, -my favourite- to take out the leading white spaces on queue_ids from grep'd and cut'd ;-) postfix logs.
Thanks dhaj for showing me this trick.
Thursday, February 26, 2009
timezone stuff
note to self
On RHEL4+ systems, timezone data files are kept in /usr/share/zoneinfo/ with the /etc/localtime symbolic link pointing at the correct time zone the machine belonging to.
If the time zone data file doesn't contain the correct information, then the system seem to assume its on GMT. Now if the system date and time is set manually to the current localtime, everything appears normal.
One noticed problem that happens in such a setup is if this machine serves as a mail server, then the mail header contains these time zone details. This can cause strange problems with MS Outlook, as outlook seem to use this value and the local machines time-zone details to calculate the display time on mails.
For some reason, the mail clients running on GNU/Linux systems appears to be immune to this problem. Still have find out how the mail clients such as evolution etc. display the received time on mails.
On RHELs the time zone data are provided in tzdata package, and it's important to keep that up2date, specially if it is an online system.
Monday, January 19, 2009
Setting up s/w raid on gnu/linux
note to self
mdadm can be used to create raid volumes easily in the below way.
mknod -m 0640 /dev/mdX TYPE MAJOR MINOR
chgrp disk /dev/mdX
mdadm --create=/dev/mdX --level='RAID LEVEL' --raid-devices=n /dev/sdXX /dev/sdYY
RAID LEVEL can be any value from linear, raid0, 0, stripe, raid1, 1, mirror, raid4, 4, raid5, 5, raid6, 6, raid10, 10, multipath, mp, faulty.
Eg: Creating a RAID 0 with 2 physical devices /dev/sda1 and /dev/sdb1.
mknod -m 0640 /dev/md0 b 9 0
chgrp disk /dev/md0
mdadm --create='/dev/md0' --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1
mknod is quite important, as otherwise mdadm will complain about non-existent device. Make sure to specify unused MAJOR and MINOR numbers when creating the (block)device. Refer to mknod man page for more info.
As usual, i keep forgetting this important step, and keep running in to trouble.
Very useful guides are here and here.
Some guides seem to suggest that the s/w raid configuration should be put on to a /etc/mdadm.conf, but i think this is no longer necessary.
From what i've gathered, the actual RAID configurations are kept in a superblock in member physical devices. The linux kernel identifies the and reads out that information from the physical devices( partitions ), at the boot-up, and they have to be of the type 'Linux raid autodetect' OR 'fd' for this to work properly.
Friday, December 26, 2008
SL Radio channels on mplayer
Lots of Sri Lankan online radio stations seem to require Windows Media Player plugin or some other plugin when you try to access them over the Internet. Went through a couple of those radio channels finding out which urls that can be used with mplayer. Below are the findings, hope they will come to some use. I currently only listen to YesFM, and YesFM only.
YesFM -> http://174.133.224.53/yesfm
TNL Rocks -> http://220.247.224.89/live
Lite FM -> http://222.165.133.161/live
Y FM -> http://174.133.224.53/yfm
E FM -> http://69.80.238.25
Shakthi FM -> http://174.133.224.53/shakthifm
Neth FM -> http://38.96.148.49:5552
Sirasa FM -> http://174.133.224.53/sirasafm
MAX Radio -> http://75.125.239.34:7045
As an example, to listen to YesFM,
you can use mplayer http://174.133.224.53/yesfm
This link helped quite a lot in finding out the Radio Channel web sites.
Wednesday, December 24, 2008
vim stuff
note to self
I keep forgetting this, and i want to kick my self hard so i won't!!! Even then I'm not sure i won't forget this!
To append some common text to all the lines in a text file with vi/vim, below can be used.
:%s/$/some text
\t = Tab Space
Thursday, December 04, 2008
Counter-Strike 1.6 on Wine
I wanted to play this game Counter-Strike, for some time now..and yesterday i got some free time to try this out. Actually it was pretty easy to get it to work on my Fedora9 with Wine. Only thing i had to do manually was to copy this msvbvm60.dll from a M$ Windows machine to .wine/drive_c/windows/system32/
The graphics get a bit jerky when the game is starting up, and once it loads up its quite smooth.
Btw The installer wizard was filled with some strange looking characters instead of the instructions, but i guess i got the correct buttons when i clicked. Shouldn't be hard.
This would be the second FPS game i had luck with over wine., Unreal tournament being the 1st.
This would be the second FPS game i had luck with over wine., Unreal tournament being the 1st.
Friday, November 28, 2008
yum stuff
note to self
When creating yum repositories with RHEL5 installation media,
use createrepo -g with the comps-*.xml files inside {Server, Cluster, ClusterStorage, VT}/repodata directories.
createrepo -g will add the necessary meta-data on to the repo, necessary for yum group functions to work properly.
Eg. yum grouplist, yum groupinstall
Monday, November 03, 2008
Enabling basic authentication in Squid
Found this in my gmail archive and thought it would be easier to have it on my blog.
I had replied with this to someone on the lug.lk mailing list.
Actually noticed an error on my reply as well, which is corrected on the below.
-2007-08-01
Squid supports lot of authentication methods. I'll put the basic method that uses ncsa_auth program.
You need to make the following changes to your squid.conf.
Please be advised that the below, gives only a very basic proxy setup with authentication.
If you want something complex, you might want to the squid documentation.
**Backup your existing squid.conf
Put/uncomment following lines to your squid.conf
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd
ncsa_auth program is installed along squid in redhat flavours, under /usr/lib/squid/ .
"/etc/squid/passwd" is the name of the file where all the passwords will be kept.
You can change this to point to wherever you want in the file system.
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
First line below is an ACL named "authenticated_user" Second line defines the networks in the LAN.
This should be changed according to your setup. ( i just copied over from def: squid.configuration :-) )
The third allows http access through the proxy for Authenticated connections coming from the specified networks.
acl authenticated_user proxy_auth REQUIRED
acl our_networks src 192.168.1.0/24 192.168.2.0/24
http_access allow our_networks authenticated_user
Once you have made the above changes to the squid.conf you have to create the username/passwords in the specified file. ( /etc/squid/squid_passwd in this )
For that, do,
htpasswd -c /etc/squid/squid_passwd username password
After adding the 1st user in the above way, to add more new users, use the below method.
htpasswd /etc/squid/squid_passwd username password
You can find out various parameters you can use with htpasswd from the man page.
When everything is done, simply restart the squid service..
If you want squid to connect to a separate service for authentication, refer to the squid documentation, there are quite a few methods that are currently supported.
Monday, October 13, 2008
Kernel versions on different RHELs...
note to self
When ever you need to find out a kernel version of a particular RHEL version or an update, you can head over to this Knowledge Base Article. Hope they are keeping it up-to-date.
Below is what it contains right now.
| Red Hat Enterprise Linux | ||||
| Update | v. 2.1 | v. 3 | v. 4 | v. 5 |
| GA | 2.4.9-e.3 | 2.4.21-4 | 2.6.9-5 | 2.6.18-8 |
| U1 | 2.4.9-e.12 | 2.4.21-9 | 2.6.9-11 | 2.6.18-53 |
| U2 | 2.4.9-e.24 | 2.4.21-15 | 2.6.9-22 | 2.6.18-92 |
| U3 | 2.4.9-e.34 | 2.4.21-20 | 2.6.9-34 | - |
| U4 | 2.4.9-e.40 | 2.4.21-27 | 2.6.9-42 | - |
| U5 | 2.4.9-e.49 | 2.4.21-32 | 2.6.9-55 | - |
| U6 | 2.4.9-e.57 | 2.4.21-37 | 2.6.9-67 | - |
| U7 | - | 2.4.21-40 | 2.6.9-78 | - |
| U8 | - | 2.4.21-47 | - | - |
| U9 | - | 2.4.21-50 | - | - |
Subscribe to:
Posts (Atom)
changing opnsense mtu
note to self When an OpnSense is deployed on Proxmox environment where MTU is <1500, it doesn't seem to auto-detect and leaves the O...
-
Below is procedure i used in integrating squid with OpenLDAP, and the Active Directory with the information gathered from numerous google se...
-
note to self RHN doesn't seem to play well with download managers. "wget" used to be good but noticed a small problem lately...