Centos Linux Iptables PPTP Configure

Source: Internet
Author: User

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

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.