LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   VPN gateway with linux BOX (https://www.linuxquestions.org/questions/linux-networking-3/vpn-gateway-with-linux-box-343379/)

jobbe314 07-15-2005 04:25 AM

VPN gateway with linux BOX
 
hello,
i have 2 big problem:
1) I do not speak well English
2) I do not succeed to create one logon VPN through a linux gateway

this is my configuration:

CLIENT XP WINDOWS CLASS C 192.168.2.0/24
|
|
|
| ETH1 - SERVER LINUX FC3 192.168.2.1
| ETH0 - SERVER LINUX FC3 <PUBLIC_IP>
|
|
ADSL ROUTER
|
| INTERNET
|
REMOTE SERVER <RE.MO.TE.IP>

small iptables configuration SERVER LINUX FC3

iptables --flush
iptables -t nat --flush
iptables --delete-chain

echo 1 > /proc/sys/net/ipv4/ip_forward
modprobe ip_nat_ftp
modproble ip_conntrack_ftp

iptables -t nat -A POSTROUTING --out-interface eth0 -j MASQUERADE

with this simple configuration the CLIENT XP do not succeed to create one logon VPN with the REMOTE SERVER....

if I add this line to the rules of iptbles:
iptables -t nat -A PREROUTING -d eth0 -p gre -j DNAT --to 192.168.2.2

the client with address 192.168.2.2 it succeeds to be connected !!!

how I can make why all succeed to be connected?

help me please
Paolo

eantoranz 07-16-2005 02:23 PM

there are many things that could be wrong. Let's see.

You say that the router is able to connect to the VPN? That could be because the VPN client is "opening" a port that the server has to connect to. What are the rules you have for INPUT? (iptables -L INPUT -nv)

now that I'm checking your rules... what does the second rule mean? are you sure it's correct? :scratch:
iptables -t nat -A PREROUTING -d eth0 -p gre -j DNAT --to 192.168.2.2

is it -i eth0?

jobbe314 07-18-2005 01:11 AM

>now that I'm checking your rules... what does the second rule mean? are you sure it's correct?
>iptables -t nat -A PREROUTING -d eth0 -p gre -j DNAT --to 192.168.2.2

>is it -i eth0?

yes, it's corrected.

when I add this line, client 192.168.2.2, works.

through tcpdump I see that packet GRE that arrive from the REMOTE SERVER do not come address to you in the correct way.

when I add the rule over, all the packages sell address you to address 192.168.2.2, for this reason the client 192.168.2.2 work !!!

help !!

eantoranz 07-18-2005 09:26 AM

Ok... so you are able to connect client 192.168.2.2 if you use that rule in the firewall... if you don't, the connection fails, right?

peter_robb 07-18-2005 10:38 AM

do iptables-save to list all active rules and POLICYs

There are 4 conntrack modules which handles the extra GRE traffic. They will need to be compiled into the kernel and iptables.
They come from the pptp_conntrack_nat patch at
http://www.netfilter.org/patch-o-mat...-conntrack-nat

barf 08-02-2005 09:43 PM

hi jobbe

the standard FC kernels dont have the patch for correct NAT-ing of PPTP clients. its a tricky situation and you will need to patch the netfilter modules in the kernel and re-compile.

does anyone know of FC kernel RPMs that have this built in?


All times are GMT -5. The time now is 05:39 PM.