segment. localip indicates the IP address of the server, and remoteip indicates the IP address assigned to the client, which can be set as a range. here we use the default pptp configuration:
Localip 192.168.0.1
Remoteip 192.168.0.234-238,192.168 .0.245
Note that the IP segment settings will directly affect the command for adding iptables rules. please note that the matching is correct. if you are too troublesome, we recommend that you use the configuration in this article to copy commands and
Description
RouterOS Server ip:172.31.101.80
RouterOS version: RouterOS V6.15
Demand:
To configure the PPTP VPN server on the RouterOS server, the PPTP VPN Client dial-in network segment is: 172.31.101.60-172.31.101.79
Operation Steps:
First, login RouterOS server
Use Winbox to login here RouterOS
Winbox Download: Http://download2.mikrotik.com/route
N2N is a two-tier point-to-point virtual private network (VPN) that allows users to develop typical peer-to-peer applications at the network level rather than the application level. This means that users can gain local IP visibility (for example, two PCs belonging to the same n2n network can ping each other), and no matter which network they are in, they can access it as long as they have the same network IP address. In short, just as OpenVPN has move
Network Configuration:/Etc/sysconfig/networkNETWORKING = yesNETWORKING_IPV6 = yesHOSTNAME = localhost. localdomainGATEWAY = 192.168.5.1
/Etc/sysconfig/network-scripts/ifcfg-eth0# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]DEVICE = eth0 // used to set the name of the Network InterfaceBOOTPROTO = static // set whether the network interface is configured as static or dhcp;BROADCAST = 192.168.5.255HWADDR = 00: 0C: 29: D1: 42: 3FIPADDR = 192.168.5.247 // set the network interface addressGATEW
After the vpn is installed, a 800 error is prompted when you connect to the vpn using windows. Generally, the firewall does not open the corresponding Port. In this case, add the port to the firewall. The code is as follows:Iptables-a input-m state-state NEW-m tcp-p tcp-dport 1723-j ACCEPTService iptables save (save)Service iptables restart (restart the service to make the configuration take effect)Tip: If
Description
RouterOS Server ip:172.31.101.80
RouterOS version: RouterOS V6.15
Demand:
To configure the PPTP VPN server on the RouterOS server, the PPTP VPN Client dial-in network segment is: 172.31.101.60-
172.31.101.79
Operation Steps:
First, login RouterOS server
Use Winbox to login here RouterOS
Winbox Download: Http://
are encrypted with IPSec. An internet-based PPTP server is a VPN server that uses the PPTP protocol, one with an interface on the Internet and another interface on an intranet.
PPTP connection process and tunnel maintenance
The PPTP control connection is established between the PPTP client IP address and the PPTP server IP address, the PPTP client uses the dynamically assigned TCP port number, and the PPTP server uses the reserved TCP port number
The company now uses iptables as the firewall in the LAN, the Internet is no problem. This time, because of the test, you need to connect PPTP VPN. The problem is, the VPN dial has failed and reported 619 errors. I have no problem with my cell phone or my home dialing.
Landing the router, the PPTP support all open to try again, the result is not.
Then find the reason for iptables, finally finally resolved
MASQUERADE
II configure iptables on the right Gateway
# Iptables-t nat-a postrouting-o eth1-s 172.16.1.0/24-d! 192.168.1.0/24-j MASQUERADE
5. Start ipsec and connect
# Service ipsec start
# Ipsec verify
Checking your system to see if IPsec got installed and started correctly:
Version check and ipsec on-path [OK]
Linux Openswan U2.6.34/K2.6.18-164. el5 (netkey)
Checking for IPsec support in kernel [OK]
SAref kernel support [N/A]
NETKEY: Testing XFRM r
Install necessary software
Apt-get install pptpd kernel-tree-2.6.10 kernel-package
Apt-get install kernel-patch-mppe libc6-dev
Decompress Linux kernel
Cd/usr/src
Tar xjf kernel-source-2.6.10.tar.bz2
Configure the kernel
I copied an existing config file.
Cd/usr/src/kernel-source-2.6.10
Cp/boot/config-2.6.10-1-686-smp. config
Compile the kernel
Make-kpkg -- added-patches debian, mppe -- append-to-version-686-smp-mppe -- initrd kernel_image
Then go to t
After verification, we know
The reason for the error on my side is that the iptables rule does not open 1723 ports
Solution:
The code is as follows
Copy Code
Chkconfig iptables offService Iptables Stop==============Iptables-t nat-a postrouting-o Eth0-j MasqueradeIptables-a input-i eth0-p TCP--dport 1723-j ACCEPTIptables-a input-i eth0-p gre-j ACCEPTIptables-a forward-i ppp+-o eth0-j ACCEPTIptables-a forward-i eth0-o ppp+-j ACCEPTIptables-a output-p TCP--dport 1723-
The following log contents appear for each connection failure when Rehl (619 error) occurs when the PPTP VPN server connection is set up to view the system log [Cat/var/log/messages |grep pptpd]:
Gre:read (fd=6,buffer=80504c0,len=8196) from PTY failed:status =-1 Error = Input/output error, usually caused by unexpec Ted Termination of PPPD, check option syntax and PPPD logsCtrl:pty Read or GRE write failed (pty,gre) = (6,7)Ctrl:reaping Child ppp[13354
solution will not be guaranteed.
Solution 2: wired
The cable solution can only deploy single-mode optical fiber cables at a distance of 12 kilometers, which is more time-consuming and costly. You can say you don't have to think about it.
Solution 3: Internet + VPN
The Internet can be said to be a public wide area network, and many telecom operators have established a four-way and eight-way long-distance network, which makes it possible for our compan
is a powerful, highly configurable, ssl-based VPN (Virtual Private Network) Open Source software. It has multiple verification methods and many powerful functions. OpenVPN operates on layer 2nd or layer 3rd of the OSI model and uses SSL/TLS protocol for network transmission. Supports various customer authentication methods, such as certificates, smart cards, and user name and password certificates. In addition, there is a powerful ACL function that l
ifconfig.
Create an iptables file in the/etc/network/if-up.d/directory with the following content:#! /Bin/sh
Iptables-restore Add the execution permission to the script:Chmod + x/etc/NET/if-up.d/iptables
Modify/etc/sysctl. the conf content is as follows: There are two items not listed above. You can simply add them directly. Other projects mainly remove comments. In fact, you can directly copy the following content to the configuration file:Net. ipv4.ip _ forward = 1
Net. ipv4.conf. all. send_r
Rd and RT (mpls vpn bgp)
Rd (route-distinguisher) is used to identify different VPN instances on the PE device. Its main function is to achieve address multiplexing between VPN instances. It and the IP address constitute a 12byte vpnv4 address space, rd and the route are carried together in the bgp update message and published to the peer end. On the one hand, we
Compile a Python script to configure VPN in batches and a python script vpn tutorial
Origin
As we all know, the recent network is not harmonious, the speed is slow, and the VPN is still disconnected. Fortunately, yunti provides a lot of servers for switching, but there are quite a lot of yunti servers, in Linux, Networ
after restart.For client 741 errors, see: http://bbs.aliyun.com/read/161352.html2. The local vpn settings are as follows: 1. set vpn connection properties-Network-TCP/IP protocol-advanced cancel "use the default gateway on the remote network" so that the global data of the VPN connection still goes through the local network. 2. Set the local route table with a s
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.