Problems Natting PPTP with iptables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

      I'm having problems trying to Nat PPTP using iptables. I've been researching/testing this for a week already and still cannot get this thing to work. I've tried patching my 2.4.20-20.7 kernel using pptp nat patch and it wouldn't load the nat module and it displays "parameter not valid" for REROUTING. Also a PPTP client sometimes connects to a PPTP server out on the Internet from the Internal network.  I'm using Redhat 7.1 with iptables-1.2.8-8.72.3. Is there a distru or RPM that has this already enabled and working. Been reading forums where people are having the same problem.

 

 

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

iptables -A FORWARD -i eth0 -j ACCEPT

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

 

iptables -t nat -A PREROUTING -p tcp -d <WAN ip address> --dport 1723  \

         -j DNAT --to <internal ip address>

iptables -t nat -A PREROUTING -p tcp -s <WAN ip address> --sport 1723 \

         -j DNAT --to <internal ip address>

iptables -t nat -A PREROUTING -p udp -d <WAN ip address> --dport 500  \

         -j DNAT --to <internal ip address>

iptables -t nat -A PREROUTING -p 47 -d <WAN ip address> \

         -j DNAT --to <internal ip address>

iptables -t nat -A PREROUTING -p 47 -d <WAN ip address>  \

         -j DNAT --to <internal ip address>

 

iptables -A FORWARD -p tcp -s 0/0 --dport 1723  -j ACCEPT

iptables -A FORWARD -p tcp -s 0/0 --sport 1723  -j ACCEPT

iptables -A FORWARD -p 47 -s 0/0 -d 0/0  -j ACCEPT

iptables -A FORWARD -p 50 -s 0/0 -j ACCEPT

iptables -A FORWARD -p udp --sport 500 --dport 500 -j ACCEPT

 

 

Thanks,

 

E.T.


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux