dpkg-reconfigure tzdata
March 5, 2010
March 4, 2010
How to run multiple instances of yahoo messenger
It is possible to run several instances of Yahoo! Messenger using a tiny registry tweak.
Create a file named “yahoo.reg” and copy and paste the following inside it :
REGEDIT4 [HKEY_CURRENT_USER\Software\yahoo\pager\Test] "Plural"=dword:00000001
Save the file and double click on it , windows asks for a confirmation to write the data inside windows registry , click on Yes.
We are all set 🙂
February 13, 2010
How to remove LiveZilla copyright link
Open livezilla/_config/config.inc.php file.
Search for $CONFIG[“gl_c_param”] in the file and comment or remove the line.
All Done 🙂
November 15, 2009
How to setup a general IP proxy in linux
the networking features in Linux are really amazing , in this post I want to show you how you can setup a general IP proxy on a specific port.
in order to write the required script open a new file named proxy :
nano proxy
copy and paste the following script into the file :
YourIP=X.X.X.X TargetIP=Y.Y.Y.Y Port=Z iptables -t nat -A PREROUTING -p tcp --dport $Port -d $YourIP -j DNAT --to $TargetIP iptables -t nat -A POSTROUTING -p tcp --dport $Port -d $TargetIP -j SNAT --to $YourIP
Change X.X.X.X to your nic IP.
Change Y.Y.Y.Y to target IP.
and Change Z to the port which needs to be proxied.
save and close the file.
make it executable and run it :
chmod +x proxy ./proxy
enable IPv4 forwarding in sysctl.conf :
nano /etc/sysctl.conf
and make sure you have the following line uncommented :
net.ipv4.ip_forward=1
and apply the changes :
sysctl -p
now we are all set 🙂
October 7, 2009
How to backup and restore your Windows VPS
The best solution to backup your VPS data is to compress your files and folders into a single zip file and then upload it to a free file hosting service , after upload it will give you a link so you can download the zip file on your home pc or on another VPS and then you can decompress it.
for compressor I recommend 7zip which is a free software and can be downloaded from the following link :
http://www.7-zip.org/download.html
and for free file hosting service I recommend the following site :
http://ifile.it
September 19, 2009
cPanel/WHM max emails each domain can send per hour
if you want to limit all domains globally , login into your WHM control panel. then go to Server Configuration –> Tweak Settings.
in the Mail section , you will find this setting :
The maximum each domain can send out per hour (0 is unlimited)
set it to any number that you want and click on Save.
but if you want to set the limit for each domain individually , edit /var/cpanel/maxemails :
nano /var/cpanel/maxemails
and add the following line into it ( replace domain.com and 100 with your domain name and limit number ) :
domain.com=100
then execute the following command :
/scripts/build_maxemails_config
September 10, 2009
Show Apache loaded modules from shell
This command shows both static and shared loaded modules in Apache :
httpd -M
August 27, 2009
How to clear all iptables rules
In order to flush all iptables rules , Run the following commands :
iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT
How to change windows 2003 administrator password from RDP.
In order to connect to a windows VPS remotely , you need to use a software named “Remote Desktop Connection” which is bundled with all versions of windows.
under windows XP it is located under : All Programs –> Accessories –> Communications
under windows Vista it is located under : All Programs –> Accessories
after running this software you will see the following window , enter the IP or host name of your VPS into the computer filed and click on Connect.
after a few seconds a new windows will be opened and you will be asked for the username and password , enter the username and password which is provided by your windows VPS provider. usually the username is Administrator.
if you enter the login details successfully , the desktop of windows VPS will be shown to you.
After you are logged into VPS , follow the below instructions :
Press CTRL+ALT+END buttons simultaneously , the following menu will appear :
Click on Change Password :
Fill the fields and click on OK.
Done 🙂
August 14, 2009
How to Auth pptpd with radius on debian
install libradiusclient-ng2 :
apt-get install libradiusclient-ng2
rename the folder :
mv /etc/radiusclient-ng/ /etc/radiusclient/
create dictionary.microsoft :
nano /etc/radiusclient/dictionary.microsoft
and copy and paste the following text into it :
# # Microsoft's VSA's, from RFC 2548 # # $Id: dictionary.microsoft,v 1.1 2002/03/06 13:23:09 dfs Exp $ # VENDOR Microsoft 311 Microsoft ATTRIBUTE MS-CHAP-Response 1 string Microsoft ATTRIBUTE MS-CHAP-Error 2 string Microsoft ATTRIBUTE MS-CHAP-CPW-1 3 string Microsoft ATTRIBUTE MS-CHAP-CPW-2 4 string Microsoft ATTRIBUTE MS-CHAP-LM-Enc-PW 5 string Microsoft ATTRIBUTE MS-CHAP-NT-Enc-PW 6 string Microsoft ATTRIBUTE MS-MPPE-Encryption-Policy 7 string Microsoft # This is referred to as both singular and plural in the RFC. # Plural seems to make more sense. ATTRIBUTE MS-MPPE-Encryption-Type 8 string Microsoft ATTRIBUTE MS-MPPE-Encryption-Types 8 string Microsoft ATTRIBUTE MS-RAS-Vendor 9 integer Microsoft ATTRIBUTE MS-CHAP-Domain 10 string Microsoft ATTRIBUTE MS-CHAP-Challenge 11 string Microsoft ATTRIBUTE MS-CHAP-MPPE-Keys 12 string Microsoft ATTRIBUTE MS-BAP-Usage 13 integer Microsoft ATTRIBUTE MS-Link-Utilization-Threshold 14 integer Microsoft ATTRIBUTE MS-Link-Drop-Time-Limit 15 integer Microsoft ATTRIBUTE MS-MPPE-Send-Key 16 string Microsoft ATTRIBUTE MS-MPPE-Recv-Key 17 string Microsoft ATTRIBUTE MS-RAS-Version 18 string Microsoft ATTRIBUTE MS-Old-ARAP-Password 19 string Microsoft ATTRIBUTE MS-New-ARAP-Password 20 string Microsoft ATTRIBUTE MS-ARAP-PW-Change-Reason 21 integer Microsoft ATTRIBUTE MS-Filter 22 string Microsoft ATTRIBUTE MS-Acct-Auth-Type 23 integer Microsoft ATTRIBUTE MS-Acct-EAP-Type 24 integer Microsoft ATTRIBUTE MS-CHAP2-Response 25 string Microsoft ATTRIBUTE MS-CHAP2-Success 26 string Microsoft ATTRIBUTE MS-CHAP2-CPW 27 string Microsoft ATTRIBUTE MS-Primary-DNS-Server 28 ipaddr Microsoft ATTRIBUTE MS-Secondary-DNS-Server 29 ipaddr Microsoft ATTRIBUTE MS-Primary-NBNS-Server 30 ipaddr Microsoft ATTRIBUTE MS-Secondary-NBNS-Server 31 ipaddr Microsoft #ATTRIBUTE MS-ARAP-Challenge 33 string Microsoft # # Integer Translations # # MS-BAP-Usage Values VALUE MS-BAP-Usage Not-Allowed 0 VALUE MS-BAP-Usage Allowed 1 VALUE MS-BAP-Usage Required 2 # MS-ARAP-Password-Change-Reason Values VALUE MS-ARAP-PW-Change-Reason Just-Change-Password 1 VALUE MS-ARAP-PW-Change-Reason Expired-Password 2 VALUE MS-ARAP-PW-Change-Reason Admin-Requires-Password-Change 3 VALUE MS-ARAP-PW-Change-Reason Password-Too-Short 4 # MS-Acct-Auth-Type Values VALUE MS-Acct-Auth-Type PAP 1 VALUE MS-Acct-Auth-Type CHAP 2 VALUE MS-Acct-Auth-Type MS-CHAP-1 3 VALUE MS-Acct-Auth-Type MS-CHAP-2 4 VALUE MS-Acct-Auth-Type EAP 5 # MS-Acct-EAP-Type Values VALUE MS-Acct-EAP-Type MD5 4 VALUE MS-Acct-EAP-Type OTP 5 VALUE MS-Acct-EAP-Type Generic-Token-Card 6 VALUE MS-Acct-EAP-Type TLS 13
create port-id-map in case it doesnt exists :
echo "" > /etc/radiusclient/port-id-map
edit /etc/radiusclient/dictionary :
nano /etc/radiusclient/dictionary
and add the following lines to the end of it :
INCLUDE /etc/radiusclient/dictionary.merit INCLUDE /etc/radiusclient/dictionary.microsoft
edit /etc/radiusclient/radiusclient.conf :
nano /etc/radiusclient/radiusclient.conf
copy and paste the following text into it , dont forget to set your own authserver and acctserver:
auth_order radius login_tries 4 login_timeout 60 nologin /etc/nologin issue /etc/radiusclient/issue authserver AUTH_Server_IP:PORT acctserver ACCT_Server_IP:PORT servers /etc/radiusclient/servers dictionary /etc/radiusclient/dictionary login_radius /usr/sbin/login.radius seqfile /var/run/radius.seq mapfile /etc/radiusclient/port-id-map default_realm radius_timeout 10 radius_retries 3 login_local /bin/login
edit /etc/radiusclient/servers :
nano /etc/radiusclient/servers
and add the following text into it , change Radius_Server_IP and SecretKey to your own settings :
Radius_Server_IP SecretKey
edit /etc/pptpd.conf :
nano /etc/pptpd.conf
and copy and paste the following text into it , change Server_IP , Remote_IP_From and Remote_IP_TO to your own settings :
option /etc/ppp/pptpd-options logwtmp localip Server_IP remoteip Remote_IP_From-Remote_IP_TO connections 200
edit /etc/ppp/pptpd-options :
nano /etc/ppp/pptpd-options
and copy and paste the following text into it :
name pptpd require-pap ms-dns 8.8.8.8 ms-dns 8.8.4.4 proxyarp nodefaultroute lock nobsdcomp mtu 1200 mru 1200 plugin radius.so plugin radattr.so lcp-echo-failure 50