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
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)
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
System Config: Compaq Presario v3033au, AMD Turion X2 TL-50, 2GB RAM, 100GB SATA HDD
- PC came with WXPH pre-installed, used PartitionMagic to create a 100mb and a 12GB partition for the /boot and / partitions.
- Downloaded and burned the Alternate (amd64) CD from one of the ubuntu mirrors.
- Booted from the CD, choose ‘OEM Install’, figured it would be better than text install.
- Followed the screens with default options, in the partition tool, chose my new partitions, chose to mount the compaq recover partition as /dos, could not mount the ntfs partition – I assume ntfs drivers are not installed on the boot cd.
- It installs packages on it’s own, does not ask to choose packages like Fedora does, I guess there would’nt be much to choose from – since everything is in one cd.
- When it came to installing grub, I made it install on my boot partition (/dev/sda3) in my case – so as to not overwrite the MBR.
- When ubuntu said it was done and wanted to reboot, I chose cancel and went to terminal prompt (from the choice of things it offered)
- In the terminal window, I wrote:dd if=/dev/sda3 of=/dos/ubuntu count=1 bs=512. This command writes the boot sector of my /boot (grub) to a file in D:\ubuntu – so it’s accessible to windows.
- I let ubuntu reboot.
- System boots back up into windows, I edit c:\boot.ini, I add: D:\ubuntu=”ubuntu Dapper”. This adds ubuntu to my windows boot menu.
- Copy the bcmwl5*.* files from C:\SwSetup\wlan to d:\ (will come to this later)
- I reboot, and see the new boot menu option.
- Graphics, sound, wired networking, usb, dvd-burner, etc all work well from the base install.
- However, it’s using the generic VESA driver to give me a 1024×768 resolution, I install nvidia drivers using: sudo apt-get install nvidia-glx nvidia-kernel-common
- That installs the nvidia driver and kernel module, then went ahead to update the Driver section of /etc/X11/xorg.conf to change the driver to “nvidia” and added Option “NoLogo” in a line below – so nVidia does not show it’s logo at every boot. Also added the resolution “1200×800” in the Screen section.
- Press Ctrl+Alt+Backspace for gdm to reload – and voila – nvidia’s native resolution works!
- Next to setup is the Broadcom 4310 chip based wireless. The built-in bcm43xx does not work, it freezes the system, ndiswrapper that comes with ubuntu is flawed as well, so download ndiswrapper from http://ndiswrapper.sourceforge.net/
- Make sure we have the compiler, kernel headers, etc : sudo apt-get install build-essentials
- tar zxvf ndiswrapper-1.23.tar.gz
- cd ndiswrapper-1.23
- sudo make
- sudo make install
- cat ‘blacklist bcm43xx’ > /etc/modprobe.d/blacklist (to make sure bcm43xx module does not get loaded)
- sudo rmmod bcm43xx
- Now we use the windows drivers and make ndiswrapper cut them: sudo ndiswrapper -i /dos/bcmwl5.inf
- sudo modprobe ndiswrapper
- Next type the command “dmesg” to see if ndiswrapper loaded the driver correctly, it did. If it does not for you – go find another driver.
- Have not been able to make ndiswrapper work with their graphical network manager tool, but to connect to wifi, I typed 2 commands:
- iwconfig eth0 essid “mynetworksessid” key “mykey” open
- dhclient eth0
- And that worked fine. There are ways to automate this using wpa_supplicant. I’ll try that later and post if successfull. My previous attempts were in vain.
- Now we are ready to get rid of the ‘oem’ account: sudo oem-config-prepare
- That does it’s bit – so on the next reboot – we will have a fresh, fully working ubuntu linux using all resources of the pc.