• Increase font size
  • Default font size
  • Decrease font size
configuration

 PPTP is called the Point to Point Tunneling Protocol - Point to Point Tunneling Protocol, is a VPN protocol

 
1, PPTP VPN Server Setup on CentOS 5.3
 
1, install related software 
32-bit version: 
#yum install-y ppp iptables 
#wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm 
#rpm-ivh pptpd-1.3.4-1.rhel5.1.i386.rpm 
 
64-bit version: 
#yum install-y ppp iptables 
#wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.x86_64.rpm 
#rpm-ivh pptpd-1.3.4-1.rhel5.1.x86_64.rpm 
 
 
2, configuration file
1, the configuration file: / etc / ppp / options.pptpd 
#mv / etc / ppp / options.pptpd / etc / ppp / options.pptpd.bak 
#vi / etc / ppp / options.pptpd 
 
Enter the following: 
name pptpd 
refuse-pap 
refuse-chap 
refuse-mschap 
require-mschap-v2 
require-mppe-128 
proxyarp 
lock 
nobsdcomp 
novj 
novjccomp 
nologfd 
ms-dns 208.67.222.222 
ms-dns 208.67.220.220 
 
 
2, the configuration file: / etc / ppp / chap-secrets 
mv / etc / ppp / chap-secrets / etc / ppp / chap-secrets.bak 
vi / etc / ppp / chap-secrets 
 
Enter the following 
# Secrets for authentication using CHAP 
# Client server secret IP addresses 
myusername pptpd mypassword * 
 
Note: Here myusername and mypassword shall PPTP VPN login user name and password 
 
 
3, the configuration file / etc / pptpd.conf 
mv / etc / pptpd.conf / etc / pptpd.conf.bak 
vi / etc / pptpd.conf 
 
Enter the following: 
option / etc / ppp / options.pptpd 
logwtmp 
localip 192.168.9.1 
remoteip 192.168.9.11-30 
 
Note: For dial-in VPN, the user dynamically allocated IP between 192.168.9.11 ~ 192.168.9.30
 

 Example 1 - Static IP

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 10.0.0.40
netmask 255.255.255.0
gateway 10.0.0.1

Example 2 – DHCP
auto eth0 iface eth0 inet dhcp

Remember the DNS configuration in /etc/resolv.conf
nameserver 195.184.96.2
nameserver 213.173.225.86

Tips
Change (spoof) the MAC
ifconfig eth0 hw ether 01:23:45:67:89:AB

From :http://www.handbook.dk/etcnetworkinterfaces-configuration-example-36.htm

 

 How to:Linux vlan configuration

Junior Member

User

1. Connect the eth0 interface of your linux machine to the switch.
2. Remove the IP Address information on the eth0 interface

# ifconfig eth0 0.0.0.0
# ifconfig eth0 up

3. Configure 2 VLANs on the eth0 interface using vconfig as follows (100,200 are the VLAN id's). 
If the 8021q.o module is not loaded, the vconfig command (when invoked first time) will automatically load the module.

# vconfig add eth0 100
# vconfig add eth0 200 

4. Configure IP on the VLAN interfaces 

# ifconfig eth0.100 xxx.xxx.xxx.xxx netmask 255.255.252.0 up
# ifconfig eth0.200 yyy.yyy.yyy.yyy netmask 255.255.255.0 up

5. Preserve the vlan configuration across reboots by adding it to configuration files. Create the appropriate ifcfg files for eth0, eth0.100 and eth0.200 in /etc/sysconfig/network-scripts/

# cd /etc/sysconfig/network-scripts/

Contents of ifcfg-eth0
DEVICE=eth0
ONBOOT=no
TYPE=Ethernet

Contents of ifcfg-eth0.100
DEVICE=eth0.100
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.252.0
VLAN=yes
ONBOOT=yes
BOOTPROTO=none

Contents of ifcfg-eth0.200
DEVICE=eth0.200
IPADDR=yyy.yyy.yyy.yyy
NETMASK=255.255.0.0
VLAN=yes
ONBOOT=yes
BOOTPROTO=none

Update /etc/sysconfig/network file to make the GATEWAYDEV use the public vlan interface.

Contents of /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=un1xf00
GATEWAY=xxx.xxx.xxx.1
DOMAINNAME=dev.un1xf00.com
GATEWAYDEV=eth0.100


6. The VLAN configuration on the server can be verified in the file /proc/net/vlan/config. Sample contents are shown below.

VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.100 | 100 | eth0
eth0.200 | 200 | eth0

From:http://nixcraft.com/networking-firewalls-security/10447-linux-vlan-configuration.html