Redhat/CentOS 5 Linux PPTP VPN Setup

1. Install the Yum Repository for PPTP

rpm -Uvh

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]

Installing Oracle 10g R2 on Ubuntu Edgy

  1. Login to ubuntu from your usual administrative account which has sudo access
  2. Make sure you have enough ram, swap space and disk space as per oracle requirements.
  3. Install the required packages (first make sure ‘universe’ is enabled in your sources.list):
    • sudo apt-get install build-essential libaio rpm lesstif2-dev alien
  4. Create the users and groups oracle needs:
    • sudo groupadd oinstall
    • sudo groupadd dba
    • sudo groupadd nobody
    • sudo useradd -g oinstall -G dba,nobody -d /opt/oracle -s /bin/bash oracle
  5. Set oracle user’s password
    • sudo passwd oracle
  6. Create the directory for the software installation and assign ownership to oracle:oinstall
    • sudo mkdir /opt/oracle
    • sudo chown -R oracle:oinstall /opt/oracle
    • sudo chmod -R 775 /opt/oracle
  7. In another console, login as oracle to make sure it works fine, then logout.
  8. Append user oracle’s .bashrc with PATH and ORACLE:BASE,HOME and SID information
    • sudo vi /opt/oracle/.bashrc
    • export ORACLE_BASE=/opt/oracle
    • export ORACLE_HOME=$ORACLE_BASE/product/10gR2
    • export ORACLE_SID=orcl
    • export PATH=$PATH:$ORACLE_HOME/bin
  9. Make sure the correct kernel parmeters are appended to /etc/sysctl.conf
    • kernel.shmall = 2097152
    • kernel.shmmax = 2147483648
    • kernel.shmmni = 4096
    • kernel.sem = 250 32000 100 128
    • net.core.rmem_default = 262144
    • net.core.rmem_max = 262144
    • net.core.wmem_default = 262144
    • net.core.wmem_max = 262144
    • fs.file-max = 65536
    • net.ipv4.ip_local_port_range = 1024 65000
  10. Set the kernel parameters or reboot
    • /sbin/sysctl -p
  11. Set /etc/security/limits.conf
    • * soft nproc 2047
    • * hard nproc 16384
    • * soft nofile 1024
    • * hard nofile 65536
  12. Create symbolic links and camoflage Kubuntu to look more like an enterprise rpm based distro because the oracle installer is expecting rhel, sles or asianux based distros.
    • sudo ln -s /usr/bin/awk /bin/awk
    • sudo ln -s /usr/bin/rpm /bin/rpm
    • sudo ln -s /lib/ /lib/
    • sudo ln -s /usr/bin/basename /bin/basename
  13. Mount the Oracle10g CD and run the installer
    • /runInstaller -ignoreSysPrereqs
  14. Installation will be uneventful provided above steps are followed
  15. Enable the oracle user to dbshut, dbstart and lsnrctl start
    • sudo vi /etc/oratab and change :N to :Y

All Done!

ubuntu Dapper Dual Boot on Compaq Presario v3000 series

System Config: Compaq Presario v3033au, AMD Turion X2 TL-50, 2GB RAM, 100GB SATA HDD

  1. PC came with WXPH pre-installed, used PartitionMagic to create a 100mb and a 12GB partition for the /boot and / partitions.
  2. Downloaded and burned the Alternate (amd64) CD from one of the ubuntu mirrors.
  3. Booted from the CD, choose ‘OEM Install’, figured it would be better than text install.
  4. 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.
  5. 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.
  6. 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.
  7. 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)
  8. 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.
  9. I let ubuntu reboot.
  10. 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.
  11. Copy the bcmwl5*.* files from C:\SwSetup\wlan to d:\ (will come to this later)
  12. I reboot, and see the new boot menu option.
  13. Graphics, sound, wired networking, usb, dvd-burner, etc all work well from the base install.
  14. 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
  15. 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.
  16. Press Ctrl+Alt+Backspace for gdm to reload – and voila – nvidia’s native resolution works!
  17. 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
  18. Make sure we have the compiler, kernel headers, etc : sudo apt-get install build-essentials
  19. tar zxvf ndiswrapper-1.23.tar.gz
  20. cd ndiswrapper-1.23
  21. sudo make
  22. sudo make install
  23. cat ‘blacklist bcm43xx’ > /etc/modprobe.d/blacklist¬† (to make sure bcm43xx module does not get loaded)
  24. sudo rmmod bcm43xx
  25. Now we use the windows drivers and make ndiswrapper cut them: sudo ndiswrapper -i /dos/bcmwl5.inf
  26. sudo modprobe ndiswrapper
  27. 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.
  28. Have not been able to make ndiswrapper work with their graphical network manager tool, but to connect to wifi, I typed 2 commands:
    1. iwconfig eth0 essid “mynetworksessid” key “mykey” open
    2. dhclient eth0
  29. 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.
  30. Now we are ready to get rid of the ‘oem’ account: sudo oem-config-prepare
  31. 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.