Article Title: Ubuntu8.10 configuring the VPN network and solving problems encountered. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The advantage of configuring a VPN network is that all virtual machines in the virtual network do not occupy external IP addresses, thus saving a lot of IP Address resources.
Use a virtual machine with a dual-nic Ubuntu 8.10 As the VPN gateway to create a VPN network. The method is as follows:
Sudo apt-get install pptpd
Sudo vim/etc/ppp/chap-secrets
Add the following line (User Name test and password test, and assign the fixed ip address 10.1.1.11 ):
Test * test 10.1.1.11
Create a VPN connection in Windows to access the VPN of the Ubuntu host. The user name test password is successfully connected.
Run ipconfig in a Windows Command Prompt. the ip address of the connection is 10.1.1.11.
It indicates that the VPN Server is successfully transferred.
Then, we need to add some other virtual machines to the virtual network to share resources.
First, configure the second Nic of the Ubuntu 8.10 virtual machine, set it to custom mode, select VMnet4, and modify its configuration
Sudo vim/etc/network/interfaces
...
Auto eth1
Iface eth1 inet static
Address 10.1.2.1
Netmask 255.255.255.0
Network 10.1.2.0
Broadcast 10.1.2.255
Set the IP address to 10.1.2.
Configure other virtual machines to join the VPN network. Change the NIC to the custom mode, select VMnet4, and change the IP address to the 10.1.2 CIDR block.
After the configuration, dial in the VPN Network in Windows and find that other machines cannot be accessed.