* Iptables do nat with Protocol 47 or GRE
@ 2004-05-14 10:24 Sez
2004-05-14 10:39 ` Antony Stone
0 siblings, 1 reply; 16+ messages in thread
From: Sez @ 2004-05-14 10:24 UTC (permalink / raw)
To: netfilter
Hi people,
I have a a vpn server in my Intranet. If i want access to this server i will
pass my firewall.
The diagram is
VPN_CLIENT(W2k box) ---- router ---- (192.168.55.94 eth0) FIREWALL
(192.168.55.95 eth1)-------- (192.168.55.92)VPN_SERVER
I create all iptables rules and VPN_CLIENT can connect to server. One client
go well. But if another client try to connect he has this error
*** error 721: Remote server don't response. ***
I see in the log file that all packets from second client was dropped. And
first client go well his connection.
Here are my important iptables rules:
iptables -t nat -A PREROUTING -s 0.0.0.0/0 -d 192.168.55.94 -p TCP --dport
1723 -j DNAT --to 192.168.55.92:1723
iptables -t nat -A PREROUTING -s 0.0.0.0/0 -d 192.168.55.94 -p GRE -j DNAT
--to 192.168.55.92
iptables -t nat -A POSTROUTING -p TCP -s 0.0.0.0/0 -d 192.168.55.92 --dport
1723 -o eth1 -j MASQUERADE
iptables -t nat -A POSTROUTING -p GRE -s 0.0.0.0/0 -d 192.168.55.92 -o eth1
-j MASQUERADE
And other rules...
I receive packet
SOURCE --> IP_VPN_CLIENT
DESTINATION --> 192.168.55.94
and I forward all packets and change ip source and ip destination.
Firewall out
SOURCE --> 192.168.55.95
DESTINATION--> 192.168.55.92
I also do the same to return de packet. I change the ip source, because
VPN_SERVER has another gateway, it don't have Firewall with GATEWAY.
Don't Iptables have nat with differents gre connections??? Or have I some
errors?
Thanks!
SERGI
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Iptables do nat with Protocol 47 or GRE
2004-05-14 10:24 Iptables do nat with Protocol 47 or GRE Sez
@ 2004-05-14 10:39 ` Antony Stone
2004-05-14 10:50 ` Sez
2004-05-14 11:14 ` Sez
0 siblings, 2 replies; 16+ messages in thread
From: Antony Stone @ 2004-05-14 10:39 UTC (permalink / raw)
To: netfilter
On Friday 14 May 2004 11:24 am, Sez wrote:
> Hi people,
>
> I have a a vpn server in my Intranet. If i want access to this server i
> will pass my firewall.
>
> The diagram is
>
> VPN_CLIENT(W2k box) ---- router ---- (192.168.55.94 eth0) FIREWALL
> (192.168.55.95 eth1)-------- (192.168.55.92)VPN_SERVER
>
> I create all iptables rules and VPN_CLIENT can connect to server. One
> client go well. But if another client try to connect he has this error
> *** error 721: Remote server don't response. ***
Are you using the PPTP NAT connection tracking helper module? If not, you
will not be able to support more than one connection at a time.
Regards,
Antony.
--
There are two possible outcomes:
If the result confirms the hypothesis, then you've made a measurement.
If the result is contrary to the hypothesis, then you've made a discovery.
- Enrico Fermi
Please reply to the list;
please don't CC me.
^ permalink raw reply [flat|nested] 16+ messages in thread* RE: Iptables do nat with Protocol 47 or GRE
2004-05-14 10:39 ` Antony Stone
@ 2004-05-14 10:50 ` Sez
2004-05-14 10:59 ` Antony Stone
2004-05-14 11:14 ` Sez
1 sibling, 1 reply; 16+ messages in thread
From: Sez @ 2004-05-14 10:50 UTC (permalink / raw)
To: netfilter
How can i know if i use connection trackink helper module??
Where can i obtain this?
-----Mensaje original-----
De: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] En nombre de Antony Stone
Enviado el: divendres, 14 / maig / 2004 12:40
Para: netfilter@lists.netfilter.org
Asunto: Re: Iptables do nat with Protocol 47 or GRE
On Friday 14 May 2004 11:24 am, Sez wrote:
> Hi people,
>
> I have a a vpn server in my Intranet. If i want access to this server
> i will pass my firewall.
>
> The diagram is
>
> VPN_CLIENT(W2k box) ---- router ---- (192.168.55.94 eth0) FIREWALL
> (192.168.55.95 eth1)-------- (192.168.55.92)VPN_SERVER
>
> I create all iptables rules and VPN_CLIENT can connect to server. One
> client go well. But if another client try to connect he has this error
> *** error 721: Remote server don't response. ***
Are you using the PPTP NAT connection tracking helper module? If not, you
will not be able to support more than one connection at a time.
Regards,
Antony.
--
There are two possible outcomes:
If the result confirms the hypothesis, then you've made a measurement.
If the result is contrary to the hypothesis, then you've made a discovery.
- Enrico Fermi
Please reply to the
list;
please don't CC
me.
^ permalink raw reply [flat|nested] 16+ messages in thread* RE: Iptables do nat with Protocol 47 or GRE
2004-05-14 10:39 ` Antony Stone
2004-05-14 10:50 ` Sez
@ 2004-05-14 11:14 ` Sez
2004-05-14 11:30 ` Antony Stone
1 sibling, 1 reply; 16+ messages in thread
From: Sez @ 2004-05-14 11:14 UTC (permalink / raw)
To: netfilter
I am a newbie ... Some tutorial to do this?? I have redhat 8.0, some rpm
with pptp nat connection tracking??
I read in some site that i must recompile the kernel??? Or only iptables???
I am a bit confussed!
-----Mensaje original-----
De: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] En nombre de Antony Stone
Enviado el: divendres, 14 / maig / 2004 12:40
Para: netfilter@lists.netfilter.org
Asunto: Re: Iptables do nat with Protocol 47 or GRE
On Friday 14 May 2004 11:24 am, Sez wrote:
> Hi people,
>
> I have a a vpn server in my Intranet. If i want access to this server
> i will pass my firewall.
>
> The diagram is
>
> VPN_CLIENT(W2k box) ---- router ---- (192.168.55.94 eth0) FIREWALL
> (192.168.55.95 eth1)-------- (192.168.55.92)VPN_SERVER
>
> I create all iptables rules and VPN_CLIENT can connect to server. One
> client go well. But if another client try to connect he has this error
> *** error 721: Remote server don't response. ***
Are you using the PPTP NAT connection tracking helper module? If not, you
will not be able to support more than one connection at a time.
Regards,
Antony.
--
There are two possible outcomes:
If the result confirms the hypothesis, then you've made a measurement.
If the result is contrary to the hypothesis, then you've made a discovery.
- Enrico Fermi
Please reply to the
list;
please don't CC
me.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: Iptables do nat with Protocol 47 or GRE
2004-05-14 11:14 ` Sez
@ 2004-05-14 11:30 ` Antony Stone
2004-05-14 12:11 ` Sez
2004-05-14 12:15 ` Sez
0 siblings, 2 replies; 16+ messages in thread
From: Antony Stone @ 2004-05-14 11:30 UTC (permalink / raw)
To: netfilter
On Friday 14 May 2004 12:14 pm, Sez wrote:
> I am a newbie ... Some tutorial to do this?? I have redhat 8.0, some rpm
> with pptp nat connection tracking??
>
> I read in some site that i must recompile the kernel??? Or only iptables???
> I am a bit confussed!
I hope someone else here will be able to help you. I do not use Red Hat,
RPMs or PPTP (I use Slackware and IPsec), so although I know what's involved,
I can't give you detailed instructions for this setup.
I'm sure other people here know and will be able to advise you how to do it.
Regards,
Antony.
--
"640 kilobytes (of RAM) should be enough for anybody."
- Bill Gates
Please reply to the list;
please don't CC me.
^ permalink raw reply [flat|nested] 16+ messages in thread* RE: Iptables do nat with Protocol 47 or GRE
2004-05-14 11:30 ` Antony Stone
@ 2004-05-14 12:11 ` Sez
2004-05-14 12:27 ` Antony Stone
2004-05-14 12:15 ` Sez
1 sibling, 1 reply; 16+ messages in thread
From: Sez @ 2004-05-14 12:11 UTC (permalink / raw)
To: netfilter
Hi, again...
I have other question about it.
If i change the ip destination on GRE packets, i don't make nat... It can
work? Exist other solution that i don't recompile the kernel???
-----Mensaje original-----
De: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] En nombre de Antony Stone
Enviado el: divendres, 14 / maig / 2004 13:30
Para: netfilter@lists.netfilter.org
Asunto: Re: Iptables do nat with Protocol 47 or GRE
On Friday 14 May 2004 12:14 pm, Sez wrote:
> I am a newbie ... Some tutorial to do this?? I have redhat 8.0, some
> rpm with pptp nat connection tracking??
>
> I read in some site that i must recompile the kernel??? Or only
iptables???
> I am a bit confussed!
I hope someone else here will be able to help you. I do not use Red Hat,
RPMs or PPTP (I use Slackware and IPsec), so although I know what's
involved, I can't give you detailed instructions for this setup.
I'm sure other people here know and will be able to advise you how to do it.
Regards,
Antony.
--
"640 kilobytes (of RAM) should be enough for anybody."
- Bill Gates
Please reply to the
list;
please don't CC
me.
please don't CC me.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: Iptables do nat with Protocol 47 or GRE
2004-05-14 12:11 ` Sez
@ 2004-05-14 12:27 ` Antony Stone
0 siblings, 0 replies; 16+ messages in thread
From: Antony Stone @ 2004-05-14 12:27 UTC (permalink / raw)
To: netfilter
On Friday 14 May 2004 1:11 pm, Sez wrote:
> Hi, again...
>
> I have other question about it.
>
> If i change the ip destination on GRE packets, i don't make nat... It can
> work ?
I don't understand the difference. What is NAT, if it's not changing the
source or destination IP address?
Regards,
Antony.
--
In Heaven, the police are British, the chefs are Italian, the beer is Belgian,
the mechanics are German, the lovers are French, the entertainment is
American, and everything is organised by the Swiss.
In Hell, the police are German, the chefs are British, the beer is American,
the mechanics are French, the lovers are Swiss, the entertainment is Belgian,
and everything is organised by the Italians.
Please reply to the list;
please don't CC me.
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Iptables do nat with Protocol 47 or GRE
2004-05-14 11:30 ` Antony Stone
2004-05-14 12:11 ` Sez
@ 2004-05-14 12:15 ` Sez
2004-05-14 12:44 ` Antony Stone
1 sibling, 1 reply; 16+ messages in thread
From: Sez @ 2004-05-14 12:15 UTC (permalink / raw)
To: netfilter
And, with l2pt or ipsec, iptables work fine without path GRE???
-----Mensaje original-----
De: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] En nombre de Antony Stone
Enviado el: divendres, 14 / maig / 2004 13:30
Para: netfilter@lists.netfilter.org
Asunto: Re: Iptables do nat with Protocol 47 or GRE
On Friday 14 May 2004 12:14 pm, Sez wrote:
> I am a newbie ... Some tutorial to do this?? I have redhat 8.0, some
> rpm with pptp nat connection tracking??
>
> I read in some site that i must recompile the kernel??? Or only
iptables???
> I am a bit confussed!
I hope someone else here will be able to help you. I do not use Red Hat,
RPMs or PPTP (I use Slackware and IPsec), so although I know what's
involved, I can't give you detailed instructions for this setup.
I'm sure other people here know and will be able to advise you how to do it.
Regards,
Antony.
--
"640 kilobytes (of RAM) should be enough for anybody."
- Bill Gates
Please reply to the
list;
please don't CC
me.
please don't CC me.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: Iptables do nat with Protocol 47 or GRE
2004-05-14 12:15 ` Sez
@ 2004-05-14 12:44 ` Antony Stone
2004-05-14 13:00 ` Sez
0 siblings, 1 reply; 16+ messages in thread
From: Antony Stone @ 2004-05-14 12:44 UTC (permalink / raw)
To: netfilter
On Friday 14 May 2004 1:15 pm, Sez wrote:
> And, with l2pt or ipsec, iptables work fine without path GRE???
IPsec does not use GRE. IPsec uses protocols 50 and 51 - ESP and AH.
IPsec works fine over NAT in Tunnel Mode (not Transport Mode without serious
fiddling with things).
GRE is protocol 47.
L2TP is a UDP-based protocol (port 1701) as far as I know.
Regards,
Antony.
--
Your work is both good and original. Unfortunately the parts that are good
aren't original, and the parts that are original aren't good.
- Samuel Johnson
Please reply to the list;
please don't CC me.
^ permalink raw reply [flat|nested] 16+ messages in thread* RE: Iptables do nat with Protocol 47 or GRE
2004-05-14 12:44 ` Antony Stone
@ 2004-05-14 13:00 ` Sez
2004-05-14 13:14 ` Antony Stone
0 siblings, 1 reply; 16+ messages in thread
From: Sez @ 2004-05-14 13:00 UTC (permalink / raw)
To: netfilter
I have a microsoft server to l2tp/ipsec. And my firewall is a Linux. I
understand that if i create a server in micro$oft box, i can routing the
traffic with Linux with any problem (no recompile, multiple users, nat with
l2tp/ipsec).
Is it true?
Thanks!
-----Mensaje original-----
De: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] En nombre de Antony Stone
Enviado el: divendres, 14 / maig / 2004 14:45
Para: netfilter@lists.netfilter.org
Asunto: Re: Iptables do nat with Protocol 47 or GRE
On Friday 14 May 2004 1:15 pm, Sez wrote:
> And, with l2pt or ipsec, iptables work fine without path GRE???
IPsec does not use GRE. IPsec uses protocols 50 and 51 - ESP and AH.
IPsec works fine over NAT in Tunnel Mode (not Transport Mode without serious
fiddling with things).
GRE is protocol 47.
L2TP is a UDP-based protocol (port 1701) as far as I know.
Regards,
Antony.
--
Your work is both good and original. Unfortunately the parts that are good
aren't original, and the parts that are original aren't good.
- Samuel Johnson
Please reply to the
list;
please don't CC
me.
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: Iptables do nat with Protocol 47 or GRE
2004-05-14 13:00 ` Sez
@ 2004-05-14 13:14 ` Antony Stone
2004-05-14 14:12 ` Alexis
2004-05-14 16:52 ` Sezmillenium
0 siblings, 2 replies; 16+ messages in thread
From: Antony Stone @ 2004-05-14 13:14 UTC (permalink / raw)
To: netfilter
On Friday 14 May 2004 2:00 pm, Sez wrote:
> I have a microsoft server to l2tp/ipsec. And my firewall is a Linux. I
> understand that if i create a server in micro$oft box, i can routing the
> traffic with Linux with any problem (no recompile, multiple users, nat with
> l2tp/ipsec).
Can someone who knows about L2TP / IPsec step in here please?
Regards,
Antony.
--
The lottery is a tax for people who can't do maths.
Please reply to the list;
please don't CC me.
^ permalink raw reply [flat|nested] 16+ messages in thread* RE: Iptables do nat with Protocol 47 or GRE
2004-05-14 13:14 ` Antony Stone
@ 2004-05-14 14:12 ` Alexis
2004-05-14 16:52 ` Sezmillenium
1 sibling, 0 replies; 16+ messages in thread
From: Alexis @ 2004-05-14 14:12 UTC (permalink / raw)
To: netfilter
Im not shure about the question.
Could you be more specific?
-----Mensaje original-----
De: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] En nombre de Antony Stone
Enviado el: Viernes, 14 de Mayo de 2004 10:15
Para: netfilter@lists.netfilter.org
Asunto: Re: Iptables do nat with Protocol 47 or GRE
On Friday 14 May 2004 2:00 pm, Sez wrote:
> I have a microsoft server to l2tp/ipsec. And my firewall is a Linux. I
> understand that if i create a server in micro$oft box, i can routing
> the traffic with Linux with any problem (no recompile, multiple users,
> nat with l2tp/ipsec).
Can someone who knows about L2TP / IPsec step in here please?
Regards,
Antony.
--
The lottery is a tax for people who can't do maths.
Please reply to the
list;
please don't CC
me.
^ permalink raw reply [flat|nested] 16+ messages in thread* RE: Iptables do nat with Protocol 47 or GRE
2004-05-14 13:14 ` Antony Stone
2004-05-14 14:12 ` Alexis
@ 2004-05-14 16:52 ` Sezmillenium
1 sibling, 0 replies; 16+ messages in thread
From: Sezmillenium @ 2004-05-14 16:52 UTC (permalink / raw)
To: netfilter
Hi!
OK. I have this situation
VPN_CLIENT(w2k box) ---> router ---> FIREWALL (NAT) ---> M$ Server
I want to configure only the Firewall.
First, I tried to create a connection with pptp. Pptp need protocol GRE and
iptables don't support nat with protocol GRE. I must recompile the Kernel...
M$ server also supports ipsec and l2tp. Is ipsec/l2tp supported with
iptables without recompile the kernel? It's more difficult???
Thanks!
SERGI
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Iptables do nat with Protocol 47 or GRE
@ 2004-05-14 16:52 Daniel Chemko
0 siblings, 0 replies; 16+ messages in thread
From: Daniel Chemko @ 2004-05-14 16:52 UTC (permalink / raw)
To: netfilter
Antony Stone wrote:
> On Friday 14 May 2004 2:00 pm, Sez wrote:
>
>> I have a microsoft server to l2tp/ipsec. And my firewall is a Linux.
>> I understand that if i create a server in micro$oft box, i can
>> routing the traffic with Linux with any problem (no recompile,
>> multiple users, nat with l2tp/ipsec).
>
> Can someone who knows about L2TP / IPsec step in here please?
I am pretty sure that all distinguishable features of IPSec are vurried
inside the encrypted tunnel, which means it can't be conntracked
uniquely through NAT. So, the only way to successfully have IPSec
tunnels is hand coding each Source-Destination w/Protocol into the NAT
tables. That's how CISCO says to forward them anyways:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft
/122t/122t13/ftnatesp.htm
Since there doesn't seem to be a conntrack helper I can only assume its
because there's no session id equivilent as there is in PPTP.
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Iptables do nat with Protocol 47 or GRE
@ 2004-05-14 17:42 Daniel Chemko
0 siblings, 0 replies; 16+ messages in thread
From: Daniel Chemko @ 2004-05-14 17:42 UTC (permalink / raw)
To: Sezmillenium, netfilter
Sezmillenium wrote:
> Hi!
>
> OK. I have this situation
>
>
> VPN_CLIENT(w2k box) ---> router ---> FIREWALL (NAT) ---> M$ Server
>
>
> I want to configure only the Firewall.
>
> First, I tried to create a connection with pptp. Pptp need protocol
> GRE and iptables don't support nat with protocol GRE. I must
> recompile the Kernel...
Option #1
Patch the kernel with POM. This isn't that hard. It should probably be
done for all the other really-good-things inside the newer netfilter
system.
Option #2
You can support One2One NAT as follows:
# This is one to one NAT with an extra field to discriminate which
client IP address the data is coming from.
# If you want to have multiple clients connect to the system
simultaniously, you repeat these rules for every client you have (NOTE
you need a public Ip for each one)
# If you want many clients, but only one at a time, you can drop the
fields with ${CLI_IP1} in it. This will mean that if > 1 person uses the
VPN at any given time, the VPN will die for one of them, but it means
you don't need an IP address for each user.
iptables -A PREROUTING --source ${CLI_IP1} --destination ${PUBLIC_IP1}
-j DNAT --to ${VPNSERVER}
iptables -A FORWARD --source ${CLI_IP1} --destination ${VPNSERVER} -j
ACCEPT
iptables -A FORWARD --source ${VPNSERVER} --destination ${CLI_IP1} -j
ACCEPT
iptables -A POSTROUTING --source ${VPNSERVER} --destination ${CLI_IP1}
-j DNAT --to ${PUBLIC_IP1}
Option #3
You can host PPTP or IPSEC from your machine. This probably also
involves kernel patching but its by far the best solution. You could
filter traffic coming and going from the VPN tunnel right from the
firewall. This prevents road warriors from infecting home office with
worms, etc.. Well, at least a well defined ruleset does.
PPTP
Look for poptop and pppd with the radius_plugin. This way, it works like
your micrsoft PPTP server but you don't need the firewall workaround. In
order for this to work, you need to spend 10 minutes learning the basics
of radius and setup "Internet Authentication Server" on a windows
2000/2003 DC.
IPSec
If you want Ipsec, you can also look at what used to be freeswan.org and
is now a lot of smaller projects apparently.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2004-05-14 17:42 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-14 10:24 Iptables do nat with Protocol 47 or GRE Sez
2004-05-14 10:39 ` Antony Stone
2004-05-14 10:50 ` Sez
2004-05-14 10:59 ` Antony Stone
2004-05-14 11:14 ` Sez
2004-05-14 11:30 ` Antony Stone
2004-05-14 12:11 ` Sez
2004-05-14 12:27 ` Antony Stone
2004-05-14 12:15 ` Sez
2004-05-14 12:44 ` Antony Stone
2004-05-14 13:00 ` Sez
2004-05-14 13:14 ` Antony Stone
2004-05-14 14:12 ` Alexis
2004-05-14 16:52 ` Sezmillenium
-- strict thread matches above, loose matches on Subject: below --
2004-05-14 16:52 Daniel Chemko
2004-05-14 17:42 Daniel Chemko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox