|
|||||||||||
|
linux-ipsec: klips and linux firewalling
From: Thilo Bindel <bnd(at)ep-ag.com>
Date: Sun Jul 05 1998 - 05:39:14 EDT
I'm testing FreeS/WAN to verify that it is the right VPN solution for my company. Everything works fine, the whole thing is stable, fast and secure. (I'm not using pluto yet.) But I've got a problem when using FreeS/WAN in conjunction with Linux Firewalling. Example: Tunneling with two security gateways (klips installed) and two small LANs behind them. Security gateway 1:
eth0: 194.120.231.194/24 (insecure net)
eth1: 10.0.2.1/24 (LAN 1)
eth0: 194.120.231.202/24
If I ping from a node within LAN 1 to a node within LAN 2, I get the following packet flow in Security gateway 1 (captured with patched firewalling): outgoing request: IP fw-in acc eth1 ICMP/8 10.0.2.2 10.0.1.2 IP fw-fwd acc ipsec0 ICMP/8 10.0.2.2 10.0.1.2 IP fw-out acc ipsec0 ICMP/8 10.0.2.2 10.0.1.2 IP fw-fwd acc eth0 IPSEC/ESP 194.120.231.194 194.120.231.202 IP fw-out acc eth0 IPSEC/ESP 194.120.231.194 194.120.231.202 incoming response: IP fw-in acc eth0 IPSEC/ESP 194.120.231.202 194.120.231.194 IP fw-in acc eth0 IPIP 194.120.231.202 194.120.231.194 IP fw-in acc eth0 ICMP/0 10.0.1.2 10.0.2.2 <-- PROBLEM IP fw-fwd acc eth1 ICMP/0 10.0.1.2 10.0.2.2 IP fw-out acc eth1 ICMP/0 10.0.1.2 10.0.2.2 My question now:
/* change skb's associated device */
if (ipsecdev)
skb->dev = ipsecdev;
if (stats) ...
This changes the behaviour in security gateway 1 for incoming packets: IP fw-in acc eth0 IPSEC/ESP 194.120.231.202 194.120.231.194 IP fw-in acc ipsec0 IPIP 194.120.231.202 194.120.231.194 IP fw-in acc ipsec0 ICMP/0 10.0.1.2 10.0.2.2 IP fw-fwd acc eth1 ICMP/0 10.0.1.2 10.0.2.2 IP fw-out acc eth1 ICMP/0 10.0.1.2 10.0.2.2 Now there is filtering possible since only IP packets with protocol ID 50 coming from the partner gateway need to be accepted by eth0. eth0 needs not to be open for the (hidden) partner LAN. Ciao Thilo Thilo Bindel, Sysadmin, bnd@ep-ag.com EIGNER + PARTNER AG
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:59:24 EDT |
||||||||||
|
|||||||||||