You can refer to the following article:
http://blog.csdn.net/bnxf00000/article/details/44263853
I didn't say anything before.
Introduction to the Environment:
Two network adapters
One is eth1 this is an external network card 46.88.7.50
One is eth0 this is the inside NIC network is 10.117.
When PPTP is configured and the protocol is set up, one more NIC
Ppp0 This IP is configured by itself in profile. Like a 192.168.0.1.
When you can dial into the system, you can use some of the following commands to operate:
The first step, because your PPTP address pool settings and intranet eth1 different network segments, when dial-in will appear PPP1 interface through Ifconfig view, so first look at the route:
Route
The second step is to add the corresponding iptables:
Iptables-t nat-a postrouting-s 192.168.0.0/24-j SNAT--to-source 46.88.7.50 (fill out your VPS Extranet network card IP)
Iptables-i INPUT 1-p gre-j ACCEPT
Iptables-i INPUT 1-p tcp-m tcp--dport 1723-j acceptiptables-a input-m State--state related,established-j ACCEPT ( Typically not performed, firewall default settings) iptables-a forward-s 192.168.0.0/24-o eth1-j ACCEPT iptables-a forward-d 192.168.0.0/24-i eth1-j ACC Ept the reasons for these commands to see the structure of the FORWARD table and input table can be tested in the input table of these two are required?? Finally, since there is no tunnel function in PPTP, you must also consider using a local gateway or a remote gateway if you want to be on the Web:
This article is from the "Sulan Network" blog, so be sure to keep this source http://zhangfang526.blog.51cto.com/8588740/1922133
Centos Linux Iptables PPTP Configure