Freebsd-net Archive

List Statistics

  • Total Threads: 2088
  • Total Posts: 6926

Phrases Used to Find This Thread

  #1  
08-06-2012 06:31 PM
Freebsd-net member admin is online now
User
 

Hi.

I have an idea about new networking feature in FreeBSD.
I guess everyone is having ideas from time to time, and lots of these
idea having people think that they just had a decent idea. However, only
ideas that are complemented by a working code can be considered by the
community, and only some of them got commited into the tree, I am fully
aware of this fact.

Unfortunately, I am not able to produce the code. I guess this is the
point where most of the subscribers will (or at least should) stop
reading this post. Still, I'm addressing this post for people that have
the time and will to do something interesting. I guess that someone may
find this interesting. Myself, I find that this could be really useful.

(You can skip this part and the next part if you only want to read about
the idea) I work about 10 years as a network engineer. My company holds
country-wide supermarkets business. I am personally responsible for the
network infrastructure of the company. As the company has lots of
(hundreds) of branch offices, lots of my time I'm constructing new VPNs
between them. My company network infrastructure is build using FreeBSD
servers and Cisco (and last year - Juniper) equipment. So I am aware and
capable of building VPN of almost any modern type, and this is the post
about building it on FreeBSD (this annoying passage was written to give
you impression that I'm not just a guy with FreeBSD server at home,
holding a couple of movies).

So. About VPNs. Another annoying passage about common ways and caveats.
Otherwise most of the reading ppl will say 'Why the hell if_ipsec ?'
(ppl that are aware of the VPNs can really skip this part). The
conventional way to build vpn is to build a tunnel of some sort. This
can be an encrypted tunnel, or an unencrypted tunnel. Unencrypted
tunnel (gre/ipinip) is obviously unencrypted, but gives you an
interface which could be using in routing. Encrypted tunnel (and I'm
talking about ipsec) cannot be used for rounting, but is encrypted.
Plus, you have to care about policies, and when multiple routers are
involved, with hundreds of networks behind them, you have to care about
tonns of policies, and this is painful. So, the industry invented a
method: you use a gre/ipinip tunnel, you pass the dynamic routing
information (you don't care bout networks, you only care abouth the
endpoints), and you encrypt this tunnel with ipsec. So, gre + ipsec (of
gif + ipsec). This way is supported by all of the major vendors, you can
build gre(ipinip)+ipsec tunnel to any Cisco/Juniper device. Though
building in to JunOS requires some skill and a deep knowledge. :)

(here the idea starts) But what is an gre or gif tunnel ? This is not an
interface, but a way to tell the system, that it needs to encapsulate
some of the payload with another header, and send it somewhere. So,
using ipsec you add an extra header, and using gre(ipinip) you add an
extra header. What if we will add an additional ability to understand
that some of the ipsec packets are destined to the security gateway
(which adds the extra header) itself, like it's possible with
gre/ipinip, so we can get rid of one extra header ? Cisco/Juniper did
that. So, Cisco has the 'tun mode ipsec ipvX' interface, and Juniper has
the st (secure tunnel) interface. How does it work: it's a convenstional
ISAKMP IPsec with the ability to treat some of the packets with a
particular IP like destined to the local (by this I mean 'this') host.
Besides this it's the old IPsec. It's even interoperable between
different vendors devices. I don't see any reason why FreeBSD cannot
have this ability, since it does have a working Ipsec and working
ISAKMP. In order to obtain this functionality FreeBSD needs to have a
way to define the templates for the SPD entries, and the way to create
these SPD entries after the creation of the interface, based on it's
address information. This will really simplify the VPN creating and
management.

So... here was the idea. :)
It came to my head after configuring the Juniper/Cisco VPN (and the
config was really short), and after reading quagga-users@ maillist,
where some of the subscribers asked about 'tun mode ipsec'. Plus, as far
as I know, Linux does not support this too, so we could really score
some points.

Eugene.
_______________________________________________
freebsd- mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-"
)

  #2  
08-06-2012 07:21 PM
Freebsd-net member admin is online now
User
 

On 06/08/2012 01:31 PM, Eugene M. Zheganin wrote:
> Hi.
>
> I have an idea about new networking feature in FreeBSD.
> I guess everyone is having ideas from time to time, and lots of these
> idea having people think that they just had a decent idea. However,
> only ideas that are complemented by a working code can be considered
> by the community, and only some of them got commited into the tree, I
> am fully aware of this fact.
>
> Unfortunately, I am not able to produce the code. I guess this is the
> point where most of the subscribers will (or at least should) stop
> reading this post. Still, I'm addressing this post for people that
> have the time and will to do something interesting. I guess that
> someone may find this interesting. Myself, I find that this could be
> really useful.
>
> (You can skip this part and the next part if you only want to read
> about the idea) I work about 10 years as a network engineer. My
> company holds country-wide supermarkets business. I am personally
> responsible for the network infrastructure of the company. As the
> company has lots of (hundreds) of branch offices, lots of my time I'm
> constructing new VPNs between them. My company network infrastructure
> is build using FreeBSD servers and Cisco (and last year - Juniper)
> equipment. So I am aware and capable of building VPN of almost any
> modern type, and this is the post about building it on FreeBSD (this
> annoying passage was written to give you impression that I'm not just
> a guy with FreeBSD server at home, holding a couple of movies).
>
> So. About VPNs. Another annoying passage about common ways and
> caveats. Otherwise most of the reading ppl will say 'Why the hell
> if_ipsec ?' (ppl that are aware of the VPNs can really skip this
> part). The conventional way to build vpn is to build a tunnel of some
> sort. This can be an encrypted tunnel, or an unencrypted tunnel.
> Unencrypted tunnel (gre/ipinip) is obviously unencrypted, but gives
> you an interface which could be using in routing. Encrypted tunnel
> (and I'm talking about ipsec) cannot be used for rounting, but is
> encrypted. Plus, you have to care about policies, and when multiple
> routers are involved, with hundreds of networks behind them, you have
> to care about tonns of policies, and this is painful. So, the industry
> invented a method: you use a gre/ipinip tunnel, you pass the dynamic
> routing information (you don't care bout networks, you only care
> abouth the endpoints), and you encrypt this tunnel with ipsec. So, gre
> + ipsec (of gif + ipsec). This way is supported by all of the major
> vendors, you can build gre(ipinip)+ipsec tunnel to any Cisco/Juniper
> device. Though building in to JunOS requires some skill and a deep
> knowledge. :)
>
> (here the idea starts) But what is an gre or gif tunnel ? This is not
> an interface, but a way to tell the system, that it needs to
> encapsulate some of the payload with another header, and send it
> somewhere. So, using ipsec you add an extra header, and using
> gre(ipinip) you add an extra header. What if we will add an additional
> ability to understand that some of the ipsec packets are destined to
> the security gateway (which adds the extra header) itself, like it's
> possible with gre/ipinip, so we can get rid of one extra header ?
> Cisco/Juniper did that. So, Cisco has the 'tun mode ipsec ipvX'
> interface, and Juniper has the st (secure tunnel) interface. How does
> it work: it's a convenstional ISAKMP IPsec with the ability to treat
> some of the packets with a particular IP like destined to the local
> (by this I mean 'this') host. Besides this it's the old IPsec. It's
> even interoperable between different vendors devices. I don't see any
> reason why FreeBSD cannot have this ability, since it does have a
> working Ipsec and working ISAKMP. In order to obtain this
> functionality FreeBSD needs to have a way to define the templates for
> the SPD entries, and the way to create these SPD entries after the
> creation of the interface, based on it's address information. This
> will really simplify the VPN creating and management.
>
> So... here was the idea. :)
> It came to my head after configuring the Juniper/Cisco VPN (and the
> config was really short), and after reading quagga-users@ maillist,
> where some of the subscribers asked about 'tun mode ipsec'. Plus, as
> far as I know, Linux does not support this too, so we could really
> score some

Hmm... I just saw a patch on linux-netdev that implements this for linux.

> points.
>
> Eugene.
> _______________________________________________
> freebsd- mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-"
>

--

"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)

"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)



_______________________________________________
freebsd- mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-"
)

  #3  
09-06-2012 06:07 PM
Freebsd-net member admin is online now
User
 

Hi Eugene,

On Fri, Jun 08, 2012 at 11:31:00PM +0600, Eugene M. Zheganin wrote:
> Hi.
>
> I have an idea about new networking feature in FreeBSD.
> I guess everyone is having ideas from time to time, and lots of these
> idea having people think that they just had a decent idea. However, only
> ideas that are complemented by a working code can be considered by the
> community, and only some of them got commited into the tree, I am fully
> aware of this fact.
>
> Unfortunately, I am not able to produce the code. I guess this is the
> point where most of the subscribers will (or at least should) stop
> reading this post. Still, I'm addressing this post for people that have
> the time and will to do something interesting. I guess that someone may
> find this interesting. Myself, I find that this could be really useful.
>
> (You can skip this part and the next part if you only want to read about
> the idea) I work about 10 years as a network engineer. My company holds
> country-wide supermarkets business. I am personally responsible for the
> network infrastructure of the company. As the company has lots of
> (hundreds) of branch offices, lots of my time I'm constructing new VPNs
> between them. My company network infrastructure is build using FreeBSD
> servers and Cisco (and last year - Juniper) equipment. So I am aware and
> capable of building VPN of almost any modern type, and this is the post
> about building it on FreeBSD (this annoying passage was written to give
> you impression that I'm not just a guy with FreeBSD server at home,
> holding a couple of movies).
>
> So. About VPNs. Another annoying passage about common ways and caveats.
> Otherwise most of the reading ppl will say 'Why the hell if_ipsec ?'
> (ppl that are aware of the VPNs can really skip this part). The
> conventional way to build vpn is to build a tunnel of some sort. This
> can be an encrypted tunnel, or an unencrypted tunnel. Unencrypted
> tunnel (gre/ipinip) is obviously unencrypted, but gives you an
> interface which could be using in routing. Encrypted tunnel (and I'm
> talking about ipsec) cannot be used for rounting, but is encrypted.
> Plus, you have to care about policies, and when multiple routers are
> involved, with hundreds of networks behind them, you have to care about
> tonns of policies, and this is painful. So, the industry invented a
> method: you use a gre/ipinip tunnel, you pass the dynamic routing
> information (you don't care bout networks, you only care abouth the
> endpoints), and you encrypt this tunnel with ipsec. So, gre + ipsec (of
> gif + ipsec). This way is supported by all of the major vendors, you can
> build gre(ipinip)+ipsec tunnel to any Cisco/Juniper device. Though
> building in to JunOS requires some skill and a deep knowledge. :)
>
> (here the idea starts) But what is an gre or gif tunnel ? This is not an
> interface, but a way to tell the system, that it needs to encapsulate
> some of the payload with another header, and send it somewhere. So,
> using ipsec you add an extra header, and using gre(ipinip) you add an
> extra header. What if we will add an additional ability to understand
> that some of the ipsec packets are destined to the security gateway
> (which adds the extra header) itself, like it's possible with
> gre/ipinip, so we can get rid of one extra header ? Cisco/Juniper did
> that. So, Cisco has the 'tun mode ipsec ipvX' interface, and Juniper has
> the st (secure tunnel) interface. How does it work: it's a convenstional
> ISAKMP IPsec with the ability to treat some of the packets with a
> particular IP like destined to the local (by this I mean 'this') host.
> Besides this it's the old IPsec. It's even interoperable between
> different vendors devices. I don't see any reason why FreeBSD cannot
> have this ability, since it does have a working Ipsec and working
> ISAKMP. In order to obtain this functionality FreeBSD needs to have a
> way to define the templates for the SPD entries, and the way to create
> these SPD entries after the creation of the interface, based on it's
> address information. This will really simplify the VPN creating and
> management.
>
> So... here was the idea. :)
> It came to my head after configuring the Juniper/Cisco VPN (and the
> config was really short), and after reading quagga-users@ maillist,
> where some of the subscribers asked about 'tun mode ipsec'. Plus, as far
> as I know, Linux does not support this too, so we could really score
> some points.

I'm not sure I've understood what you're asking. As a network engineer,
I'm sure you know there are two modes with IPSec: tunnel and transport.

Tunnel mode is weird because it practically creates an encrypted tunnel,
but the later is invisible from the OS, IIRC. With transport mode just
encrypt the payload (that is, the data after the IP header) when the SPD
says so.

What it usually done for convenience is to create a gif(4) or gre(4)
tunnel to another network, which is then encrypted using IPSec transport
mode. The inner IP/GRE header is considered as the payload and it is
encrypted. The benefit of this approach is that you "see" your tunnel,
it looks more natural from a system point of view.

I haven't used IPSec in tunnel mode for more than a decades, so I don't
remember how it is manageable. But with the IPSec transport mode +
gif/gre tunnel, you see a full-fledged interface toward the other
network, through which you can route your traffic.

--
Jeremie Le Hen

Men are born free and equal. Later on, they're on their own.
Jean Yanne
_______________________________________________
freebsd- mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-"
)

  #4  
09-06-2012 06:12 PM
Freebsd-net member admin is online now
User
 

10.06.2012 00:07, Jeremie Le Hen пишет:

> I'm not sure I've understood what you're asking. As a network engineer,
> I'm sure you know there are two modes with IPSec: tunnel and transport.
>
> Tunnel mode is weird because it practically creates an encrypted tunnel,
> but the later is invisible from the OS, IIRC.

Basically, he wants tunnel mode to create full-blown network interface
without overhead for extra gre/gif packet header.

Eugene Grosbein
_______________________________________________
freebsd- mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-"
)

  #5  
14-06-2012 08:12 AM
Freebsd-net member admin is online now
User
 

Hi,

On 09.06.2012 23:07, Jeremie Le Hen wrote:
> What it usually done for convenience is to create a gif(4) or gre(4)
> tunnel to another network, which is then encrypted using IPSec
> transport mode. The inner IP/GRE header is considered as the payload
> and it is encrypted. The benefit of this approach is that you "see"
> your tunnel, it looks more natural from a system point of view. I
> haven't used IPSec in tunnel mode for more than a decades, so I don't
> remember how it is manageable. But with the IPSec transport mode +
> gif/gre tunnel, you see a full-fledged interface toward the other
> network, through which you can route your traffic.
Yeah, but nowadays this is sort of a legacy thing.
Modern router OSes, like IOS or JunOS operate the ipsec interfaces, and
these interfaces are visible in the system and are fully operation in
the context of the dynamic routing, and I mean here sending/receiving
packets from/to these interfaces. I just wanted FreeBSD to have such a
capability.

Thank you for an explanation though. Seems like you read only the first
few lines of my post. I am fully capable... whatever. Seems like I've
already said this in my initial message.

Eugene.
_______________________________________________
freebsd- mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-"
)

  #6  
14-06-2012 04:57 PM
Freebsd-net member admin is online now
User
 

Eugene

On Thu, Jun 14, 2012 at 01:12:01PM +0600, Eugene M. Zheganin wrote:
> Hi,
>
> On 09.06.2012 23:07, Jeremie Le Hen wrote:
> > What it usually done for convenience is to create a gif(4) or gre(4)
> > tunnel to another network, which is then encrypted using IPSec
> > transport mode. The inner IP/GRE header is considered as the payload
> > and it is encrypted. The benefit of this approach is that you "see"
> > your tunnel, it looks more natural from a system point of view. I
> > haven't used IPSec in tunnel mode for more than a decades, so I don't
> > remember how it is manageable. But with the IPSec transport mode +
> > gif/gre tunnel, you see a full-fledged interface toward the other
> > network, through which you can route your traffic.
> Yeah, but nowadays this is sort of a legacy thing.
> Modern router OSes, like IOS or JunOS operate the ipsec interfaces, and
> these interfaces are visible in the system and are fully operation in
> the context of the dynamic routing, and I mean here sending/receiving
> packets from/to these interfaces. I just wanted FreeBSD to have such a
> capability.
>
> Thank you for an explanation though. Seems like you read only the first
> few lines of my post. I am fully capable... whatever. Seems like I've
> already said this in my initial message.

Not at all, I read the whole mail thoroughly actually :-). But I don't
work on Cisco/Junipers equipements so I didn't exactly grasp what you
meant.

By explaining what I know about IPSec on FreeBSD, I didn't mean to let
you think you aren't capable -- and I'm sorry if you take it that way --
it was just to engage you to explain things with regards to what I
know.

Now I understand that what you are actually proposing is basically to
make IPSec in tunnel mode create a virtual interface. I don't know why
it has never been done so far.

--
Jeremie Le Hen

Men are born free and equal. Later on, they're on their own.
Jean Yanne
_______________________________________________
freebsd- mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-"
)

  #7  
14-06-2012 08:36 PM
Freebsd-net member admin is online now
User
 

Hm, I remember some reasons down in the deep, distant past as to why
ipsec implementations moved away from tunnel mode == tunnel
interfaces. When I was being a network engineer during the day, I
constantly hated having to implement tunnels using traffic maps rather
than actual interfaces.

Chances are bz@ would know. I suggest asking him.



Adrian
_______________________________________________
freebsd- mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-"
)

  #8  
15-06-2012 05:22 AM
Freebsd-net member admin is online now
User
 

Hi.

On 14.06.2012 21:57, Jeremie Le Hen wrote:
> Not at all, I read the whole mail thoroughly actually :-). But I don't
> work on Cisco/Junipers equipements so I didn't exactly grasp what you
> meant.
>
>
Okay. Actually, the whole idea is to 'simplify'. The conventional way of
creating IPSec makes you do a lot of stuff: creating policies, creating
tunnel interfaces, creating isakmp phase 1 and phase 2 proposals.
Cisco/Juniper equipment is pretty capable of doing all of this stuff too
(if you want fine-grained control), but by defaults they got rid of all
of this configuration, it works with defaults, and works fine. And the
gre setup is especially complicated when it comes to Juniper, because
they totally got rid of the policing mechanism, and there's no way in
JunOS (at least in 10.x-12.1) to define a policy about 'what kind of
traffic to encrypt with IPSec' like you can do in Linux/*BSD/Cisco. So
I'm afraid Cisco can lose this ability too. It is still possible to
build a FreeBSD - Juniper gre/ipsec tunnel (and I'm using them), but it
requires a twisted hack with routing on the Juniper side, and a pair of
_additional_ IP addresses.

So, complicated stuff on one side, ipsec interfaces (and some default
configs) on the other.

Eugene.
_______________________________________________
freebsd- mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-"
)





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: