netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ipsec without interface
@ 2003-05-29 19:16 Andreas Jellinghaus
  2003-07-01 12:58 ` bert hubert
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Jellinghaus @ 2003-05-29 19:16 UTC (permalink / raw)
  To: netdev@oss.sgi.com

sure, the simple configurations work fine with kernel 2.5.* ipsec.
But I miss the interface and things I did with it. How are these
setups supposed to work without an interface?

a) in iptables allow everything coming from ipsec0,
   allow only ssh and ipsec on eth0.

b) source address selection. put the default route on ipsec0,
but the route to the tunnel endpoint on eth0 with the right gateway.

also I wonder why I see incoming packets before and after encryption,
but outgoing packets only before encryption.

Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ipsec without interface
  2003-05-29 19:16 ipsec without interface Andreas Jellinghaus
@ 2003-07-01 12:58 ` bert hubert
  2003-07-01 13:33   ` Andreas Jellinghaus
  0 siblings, 1 reply; 4+ messages in thread
From: bert hubert @ 2003-07-01 12:58 UTC (permalink / raw)
  To: Andreas Jellinghaus; +Cc: netdev@oss.sgi.com

On Thu, May 29, 2003 at 09:16:27PM +0200, Andreas Jellinghaus wrote:
> sure, the simple configurations work fine with kernel 2.5.* ipsec.
> But I miss the interface and things I did with it. How are these
> setups supposed to work without an interface?
> 
> a) in iptables allow everything coming from ipsec0,
>    allow only ssh and ipsec on eth0.

iptables can filter on ESP/AH presence.

> b) source address selection. put the default route on ipsec0,

Do you need a separate source address?

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ipsec without interface
  2003-07-01 12:58 ` bert hubert
@ 2003-07-01 13:33   ` Andreas Jellinghaus
  2003-07-01 14:00     ` James Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Jellinghaus @ 2003-07-01 13:33 UTC (permalink / raw)
  To: bert hubert; +Cc: netdev@oss.sgi.com

On Tue, 2003-07-01 at 14:58, bert hubert wrote:
> On Thu, May 29, 2003 at 09:16:27PM +0200, Andreas Jellinghaus wrote:
> > sure, the simple configurations work fine with kernel 2.5.* ipsec.
> > But I miss the interface and things I did with it. How are these
> > setups supposed to work without an interface?
> > 
> > a) in iptables allow everything coming from ipsec0,
> >    allow only ssh and ipsec on eth0.
> 
> iptables can filter on ESP/AH presence.

the packet is seen once as ESP/AH and once as normal (e.g. TCP)
packet. where is the connection? how can you see that a packet
came in first as ESP/AH packet and was then decrypted, and did
not came in without ipsec?

with freeswan that was easy: drop everything, unless it is from
interface ipsec0. And you always new, packets from ipsec0 came
in with valid ipsec encryption, that was easy to make sure.

and now? use fwmark? even if that works, its not as easy.

> 
> > b) source address selection. put the default route on ipsec0,
> 
> Do you need a separate source address?

I'm a "road warrior", so the local wireless lan gives me a
192.168.* address. For my ipsec tunnel to $company gateway
I need get an official address assigned, so I can use that
to access the company network, or even the internet (if I don't
trust the local network, and don't want unencrypted connections
to the internet). I think such a setup will be quite common.

local lan			some nat	company gateway	
192.168.0.* <-> 192.168.0.1			<->  1.2.3.4
ipsec tunnel
1.2.3.5 		<->				1.2.3.4 

connetion will use 1.2.3.5 <-> 1.2.3.80 (e.g. company file server,
allowing access from 1.2.3.*).

ip route del default
ip route add default gw 192.168.0.1 src 1.2.3.5

yes, that works. but it's not nice.
also company getway needs a 
	ip route add 1.2.3.5 dev eth0/1/2/whatever
even though no packet to "1.2.3.5" will ever be on any
wire - the packet will be alway encrypted and have a final
ip address somewhere in the internet or wireless network.

hmm. I haven't tried to use an explicit ipip tunnel.
did anyone use ESP in transport mode to encrypt packets
of an IPIP tunnel? that might help me.

Regards, Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ipsec without interface
  2003-07-01 13:33   ` Andreas Jellinghaus
@ 2003-07-01 14:00     ` James Morris
  0 siblings, 0 replies; 4+ messages in thread
From: James Morris @ 2003-07-01 14:00 UTC (permalink / raw)
  To: Andreas Jellinghaus; +Cc: bert hubert, netdev@oss.sgi.com

On 1 Jul 2003, Andreas Jellinghaus wrote:

> hmm. I haven't tried to use an explicit ipip tunnel.
> did anyone use ESP in transport mode to encrypt packets
> of an IPIP tunnel? that might help me.

It's known to work on a gre tunnel (if you manually adjust the mtu), so 
ipip probably works.

- James
-- 
James Morris
<jmorris@intercode.com.au>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-01 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-29 19:16 ipsec without interface Andreas Jellinghaus
2003-07-01 12:58 ` bert hubert
2003-07-01 13:33   ` Andreas Jellinghaus
2003-07-01 14:00     ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).