Connect to a remote server using vpn in Ubuntu

Source: Internet
Author: User
Article Title: Use vpn to connect to a remote server in Ubuntu. 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 company's servers provide vpn access points so that they can connect to the company's servers through vpn at home. I applied for a vpn account yesterday afternoon, and then tried to connect to the vpn Server in windows. Everything was okay to prove that my vpn account was okay, so today we are going to configure the vpn access environment in Ubuntu.

The VPN Client I use is pptp-linux from the official Ubuntu source. First download and install the pptp client from sudo apt-get install pptp-linux.

Then I checked the manual of pptp and searched the internet. It seems that the command line options of pptp are relatively simple:

Sudo pptp user password <密码> .

The company's vpn Server's Internet ip address is 100.100.1.1, the Intranet ip address is 192.168.1.1, the vpn user name is hello, And the password is hello, so after calling the following command:

Sudo pptp 100.100.1.1 user hello password hello

Then, ifconfig finds a new network connection named ppp0. The IP address corresponding to this connection should belong to the same network segment as the Intranet address of the vpn Server you are connected. The IP address corresponding to the ppp0 network connection added in my application scenario is 192.168.1.x. This new ppp0 connection is used to provide the vpn connection service.

Then, I tried to ping the company's vpn Server's intranet ip address 192.168.1.1, which can be pinged normally. Ping other servers, such as 192.168.1.10. The ping command failed! I am puzzled. It took me some time to think about it. It may be that the corresponding Gateway access to the company's server is incorrectly set. So try:

Route add 192.168.1.10 gw 192.168.1.1

Then ping 192.168.1.10 again, and the ping will be successful this time.

Then try to log on to 192.168.1.10 through ssh.

Now, I have configured the vpn work environment in Ubuntu.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.