Monday, 6 August 2012

CRONTAB

shutdown ur pc

 at 11pm


add this line using          

crontab -e

0  23  *  *  *   /sbin/init 0 


squid log file backup

at 1 am
00 01  * * *  /usr/local/squid/sbin/squid -k rotate


squid conf file reconfigure

at 7.30 pm 

30 19 * * * root /bin/cp -f /home/support/squid-rnd-n.conf /usr/local/squid /etc/squid.conf; /usr/local/squid/sbin/squid -k reconfigure

Configure LDAP Server in order to share users accounts in your local networks.


i have tested with cent6.0 it's working fine. 
 
ref site : http://www.server-world.info/en/note?os=CentOS_6&p=ldap&f=1

in my criteria system name is m1.iminds.com
change "dc=***,dc=***"  to dc=iminds,dc=com


in frontend.ldif    change "dc: server"  to dc: iminds

for add ldap user : 
 sh ldapuser.sh
 ldapadd ......

for add ldap group : 
 sh ldapgroup.sh
 ldapadd ...... 
 
 
some useful ref sites:
 
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch31_:_Centralized_Logins_Using_LDAP_and_RADIUS

http://vuksan.com/linux/LDAP_authentication_under_Linux.html 

MASQUERADE

eth0 - local private network
eth1 - public network 
 
 
iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -o eth1 -j MASQUERADE
 
 
check ur dns server having proper internet..  

Wednesday, 1 August 2012

Squid delay pool


./configure --prefix=/opt/squid --exec-prefix=/opt/squid --enable-delay-pools --enable-cache-digests --enable-poll --disable-ident-lookups --enable-truncat --enable-removal-policies

http://kasimbu.blogspot.com/2009/03/manajemen-bandwidth-di-squid.html
http://it.toolbox.com/wiki/index.php/Install_Squid_with_delay_pools
http://man.chinaunix.net/newsoft/squid/Squid_FAQ/FAQ-19.html

600000
250000/600000 5000/


768 kbytes overall acl
256kbytes for acl
download 2kbps
96000/96000 32000/32000 250/250

delay_pools 4
delay_class 1 2
delay_class 2 2
delay_class 2 3
delay_class 2 4
delay_access 1 allow acl_name
delay_parameters 1 32000/32000 640/640  or 640/32000

Windows key change

  1.Click on Start and then Run.
   2.In the text box in the Run window, type regedit and click OK. This will open the Registry Editor program.
   3.Locate the HKEY_LOCAL_MACHINE folder under My Computer and click on the (+) sign next the folder name to expand the folder.
   4.Continue to expand folders until you reach the HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents registry key.
   5.Click on the WPAEvents folder.
   6.In the results that appear in the window on the right, locate OOBETimer.
   7.Right-click on the OOBETimer entry and choose Modify from the resulting menu.
   8.Change at least one digit in the Value data text box and click OK. This will deactivate Windows XP.

      Feel free to close Registry Editor at this point.
   9.Click on Start and then Run.
  10.In the text box in the Run window, type the following command and click OK.

      %systemroot%\system32\oobe\msoobe.exe /a
  11.When the Let's activate Windows window appears, choose Yes, I want to telephone a customer service representative to activate Windows and then click Next.
  12.Click the Change Product Key button at the bottom of the window.

      Don't worry about filling anything out on this screen.
  13.Type your new, valid Windows XP product key in the New key: text boxes and then click the Update button.
  14.You should now reactivate Windows XP by following the instructions on the Activate Windows by phone window which you should now be seeing or via the Internet by clicking the Back button and following the instructions on that screen.

      If you'd rather postpone activating Windows XP until a later date, you can click the Remind me later button.
  15.After activating Windows XP, you can verify that activation was successful by repeating steps 9 and 10 above.

      The Windows Product Activation window that appears should say "Windows is already activated. Click OK to exit."

Torrent lock using iptables

torrent using this portno  6881 to 7000 and 2710

IPT="/sbin/iptables"
INSIDE=eth0  # local network card


$IPT  -A INPUT  -i $INSIDE  -d 0/0 -p tcp -m mport --dport 6881:7000 -j DROP
$IPT  -A INPUT  -i $INSIDE  -d 0/0 -p tcp --dport 2710 -j DROP


$IPT -t nat -A POSTROUTING -o $OUTSIDE -s 10.1.1.0/24 -j SNAT --to $OUTSIDE_IP