Redhat/CentOS 5 Linux PPTP VPN Setup

1. Install the Yum Repository for PPTP

rpm -Uvh http://pptpclient.sourceforge.net/yum/stable/rhel5/pptp-release-current.noarch.rpm

2. Then proceed with installing ppp & pptpd

yum install ppp
yum –enablerepo=pptp-stable install pptp

On newer CentOS distributions, ppp is already installed and at 2.4.4 or later, as of this writing pptpd needs 2.4.3 , so you may need to remove ppp and have yum install it automatically as a dependancy of pptpd

3. After installation finnish open /etc/pptpd.conf and change the configuration for localip & remoteip

localip 10.0.0.1
remoteip 10.0.0.100-120

4. After that open the file / etc / ppp / options.pptpd and change sesuia ms-dns dns server / isp you (I filled in with open dns ip)

ms-dns 8.8.8.8
ms-dns 8.8.4.4

5. Then make your VPN use

echo “username pptpd password *”>> / etc / ppp / chap-secrets

IP Forwarding & Nat
1. Set IPForward

edit /etc/sysctl.conf and update

net.ipv4.ip_forward = 1

Then run `sysctl -p` to make the system update itself with the above param.

2. Set Nat

Add the following to /etc/sysconfig/iptables to add a new nat chain/rule

:PREROUTING ACCEPT [5476825:840006712]
:POSTROUTING ACCEPT [11279:680432]
:OUTPUT ACCEPT [10099:609991]
-A POSTROUTING -s 10.0.0.0/255.255.255.0 -o eth1 -j MASQUERADE
COMMIT

Interesting Quotes

  • If a man speaks in the woods with no woman to hear .. is he still wrong?
  • I can’t believe Murdock beat out a million other sperm.
  • If I have not seen as far as others, it is because giants were standing on my shoulders. (Hal Abelson)
  • In order to make an apple pie from scratch, you must first create the universe. (Carl Sagan)
  • A closed mouth gathers no feet.
  • A consultant is someone who takes the watch off your wrist and tells you the time. Then he keeps the watch.
  • I never repeat gossip, so I’ll say this only once.
  • I refuse to engage in a battle of wits with an unarmed person.
  • I couldn’t fail to disagree with you less!
  • Our universe is simply one of those things which happen from time to time.
  • What is it that breathes fire into the equations and makes a universe for them to describe? (Stephen Hawking)
  • To be immortal with a finite memory is highly unsatisfactory. (Freeman Dyson)
  • Why should I care about future generations – what have they ever done for me?
  • Maybe one day we’ll figure out how to synthesize a new universe in a lab, set off a Big Bang, and move in.
  • Right now I’m having amnesia and deja vu at the same time. I think I’ve forgotten this before. (Steven Wright)
  • The three great American lies: Of course I’ll respect you in the morning. The check is in the mail. I’m from the government and I’m here to help you.
  • Committees do harm merely by existing. (Freeman Dyson)
  • Your IQ is so low it’s almost a shoe size.
  • I keep six honest serving men (They taught me all I know); Their names are What and Why and When And How and Where and Who. (Rudyard Kipling)
  • There is a wide variety of opinions on consultants. Some people hate them, and some people hate them a lot.
  • I don’t want to achieve immortality through my work. I want to achieve it through not dying. (Woody Allen)
  • Humanity can be divided into two categories: those who divide humanity into two categories and those who don’t.
  • The most exciting phrase to hear in science, the one that heralds new discoveries, is not “Eureka!” (I’ve found it!) but “That’s funny….” (Isaac Asimov)
  • And finally, to my cousin Willie, who always wanted to be remembered in my will, Hi, Willie.
  • Dyslexics, untie!
  • Sure I am a freeloader but my morals permit that.
  • And this is your wife, or am I mistaken again?
  • You can observe a lot just by watching. (Yogi Berra)
  • In theory there is no difference between theory and practice. In practice there is. (Yogi Berra)
  • The noble art of losing face will one day save the human race. (Piet Hein, quoted by Hans Blix)
  • Everything’s either concave or -vex, so whatever you dream will be something with sex. (Piet Hein)
  • I was promised flying cars! Where are the flying cars?! (Avery Brooks)
  • It’s not the things I forget that bother me; it’s the things I remember clearly that never happened.
  • If you find yourself in a hole, the first thing to do is stop diggin’.
  • Weather prediction will never be accurate until we kill all the butterflies.
  • I do not know who discovered water, but it probably was not a fish.
  • When life hands you a lemon, make lemonade.
  • Theology is man telling God what to think.
  • I believe you when you say that you understand what you think I said, but I am not sure you understand that what I said is not what I meant.
  • Eschew obfuscation.
  • I want to die in my sleep like my grandfather, not screaming like his passengers.
  • It ain’t over till the fat lady sings. (Tristan and Isolde, perhaps?)
  • The fat lady is clearing her throat. (A standard comment from kibitzers on the Internet Chess Club.)
  • Of course I don’t believe that putting a horseshoe over my door will bring me luck, but they say that it brings luck even to those who don’t believe in it. (Niels Bohr)
  • Military justice is to justice what military music is to music. (Groucho Marx)
  • Basically my wife was immature. I’d be at home in my bath and she’d come in and sink my boats.
  • If computers get too powerful, we can organize them into a committee.

iPhone 3G Tips

I bought my iPhone 3G on the day it was launched in India: August 22, 2008. I had to go book mine a day before and I guess that made it easier, I did not have to wait in a queue. I just landed at the store, showed my booking receipt, they charged my card for the balance and handed me the phone – but then they took it back to ‘activate’ it and gave it back after another couple of minutes. Largely a smooth process – compared to the horrific stories about the US Launch on July 11.

The first thing I did was to turn off the 3G radio. Since India does not have 3G yet, and not expected for another 6 months on Airtel. It’s best to turn this off to save battery. To do this, just go to Settings->General->Network and turn off ‘Enable 3G’.

Next thing I noticed is that iTunes would take way too long to backup the phone everytime I wanted to sync. So I disabled the automatic backup by doing the following on my mac:

Open Terminal, type: defaults write com.apple.iTunes DeviceBackupsDisabled -bool true
and hit return

Note iTunes should not be running when you do this. Launch iTunes after doing this and it won’t backup the phone every time. I am thinking that I would like to re-enable backup by changing the ‘true’ above to ‘false’ once in a month.

For Windows folks:
1. Locate your iTunesPrefs.xml file. It’s usually located in C:\Documents and Settings\username\Application Data\Apple Computer\iTunes or C:\Documents and Settings\username\Local Settings\Application Data\Apple computer\iTunes.
2. Open it in Notepad and search for a section called User Preferences and paste the following snipped into the User Preferences Section after the first <dict>:

<key>DeviceBackupsDisabled</key>
<data>
dHJ1ZQ==
</data>

3. Save the file and launch iTunes. You may want to take a backup of your existing iTunesPrefs.xml first.

Next: Turn off the Equalizer of the iPod since it eats up battery when it plays songs. Turn off the EQ by going to the Settings > iPod > EQ and change to Off.

I’ll add more as I use my iPhone more :)

Tips, Links & noteworthy stuff…