Skip to contentSkip to conversation

xt_gateway 20070605 (kernel)

DISCUSSION Amin Azez 2 participants 4 messages Jun 16, 2007 netfilter

lore
Share & tools
lore

Amin Azez

author
#0 lore raw

From: "Jan Engelhardt" <[email protected]>
Sent: 16/06/07 08:59
Subject: RE: xt_gateway 20070605 (kernel)

=Well, it is as complicated as policy routing =(e.g. using -j MARK and iproute2's fwmark match) =
=ip route add 1.3.3.7/32 dev leet0 realm 666 =iptables -t nat -A POSTROUTING -m realm --realm 666 -j =SNAT --to whatever.

Yeah, you have to have one realm per snat-ip or better, which is more complicated than just using the gateway ip.

It's true that you can use realm to make an association between gateway and snat address, but why bother if you can use gateway to make an association between gateway and snat address.

To use realm requires fiddling with routing tables (which I can do pleasantly as iproute-save supports xml) but gateway match lets users leave routing to be managed by their network scripts instead of managing it by hand.

=>Xt_gateway is persisted solely with iptables-save. There is no iproute-save =>(actually there is, I posted it to the relevant list a few months back but =>no-one noticed).

=iproute-save would have a problem: it may interfere with = (a) 'proto kernel' rules

My iproute-restore did not restore proto kernel routes, or flush them prior to a restore.

= (b) rules from the distribution (e.g. =/etc/sysconfig/network/ifroutes)
= [lesser a problem]

Likewise, scope helped recognize these.

=>I'm not going to try to convince you harder than this. Some directors and =>shareholders (if they were aware) would probably prefer that you did NOT merge =>it to the mainline kernel and I also have a duty to them.

=What would they care about how it's done?

They might prefer that anything that made things easier were not available outside of the source CD that we ship with the box. There is no official company policy on this yet, and I prefer it that way.

The gateway match makes things easier for me. All our customers will be using it. I'm happy to share it.

If Patrick judges it to be unneccessary then I don't feel very inclined to argue the point. I agree that authors cannot insist that their contributions be recommended upstream and linux is not so scarce of features that this is remotely necessary.

Like my iptables vlan match and conntrack direction match, account + rate limiting, and probably the same way as my next connroute target all of which are useful to me, I'm disapointed that they won't have wider use, but not frantic.

Sam

#1 lore raw
Quoted 5 lines · Amin Azez

= (b) rules from the distribution (e.g. =/etc/sysconfig/network/ifroutes)
= [lesser a problem]

Likewise, scope helped recognize these.

ip r: (created by)

10.0.254.1 via 10.0.254.5 dev tun0 (openvpn)
10.0.254.5 dev tun0 proto kernel scope link src 10.0.254.6 (openvpn) 192.168.254.0/24 via 10.0.254.5 dev tun0 (openvpn) 192.168.222.0/24 dev eth1 proto kernel scope link src 192.168.222.1 (distro) 192.168.60.0/22 dev vmnet1 proto kernel scope link src 192.168.60.1 (vmware) 10.10.96.0/20 dev eth0 proto kernel scope link src 10.10.106.161 (distro) 169.254.0.0/16 dev eth0 scope link (distro)
127.0.0.0/8 dev lo scope link (distro)
default via 10.10.96.1 dev eth0 (distro)

Hm! Not much to save :)

Quoted 5 lines
Quoted 1 line

What would they care about how it's done?

They might prefer that anything that made things easier were not available outside of the source CD that we ship with the box. There is no official company policy on this yet, and I prefer it that way.

One could obtain the CD and then redistribute the GPL components, and we'd be where we are now. It does not buy the corp.s anything by limiting distribution. In fact, spread it, and let others do the work ^_^.

Jan

author
#2 lore raw
Quoted 20 lines · Jan Engelhardt
Quoted 5 lines · Amin Azez

= (b) rules from the distribution (e.g. =/etc/sysconfig/network/ifroutes)
= [lesser a problem]

Likewise, scope helped recognize these.

ip r: (created by)

10.0.254.1 via 10.0.254.5 dev tun0 (openvpn)
10.0.254.5 dev tun0 proto kernel scope link src 10.0.254.6 (openvpn) 192.168.254.0/24 via 10.0.254.5 dev tun0 (openvpn) 192.168.222.0/24 dev eth1 proto kernel scope link src 192.168.222.1 (distro) 192.168.60.0/22 dev vmnet1 proto kernel scope link src 192.168.60.1 (vmware) 10.10.96.0/20 dev eth0 proto kernel scope link src 10.10.106.161 (distro) 169.254.0.0/16 dev eth0 scope link (distro)
127.0.0.0/8 dev lo scope link (distro)
default via 10.10.96.1 dev eth0 (distro)

Quoted 2 lines

Hm! Not much to save :)

And not much to save it with.
I didn't notice any realm attributes to be saved there :-) either.

(However, my routing has multiple rules and tables. I only use iproute-save for quick restore if application of new routes (xml) fails).

Quoted 10 lines
Quoted 6 lines
Quoted 2 lines

What would they care about how it's done?

They might prefer that anything that made things easier were not available outside of the source CD that we ship with the box. There is no official company policy on this yet, and I prefer it that way.

One could obtain the CD and then redistribute the GPL components, and we'd be where we are now. It does not buy the corp.s anything by limiting distribution.

Well it does.
Users have to buy the product to get _any_ of the advantages.

It also maintains the differential between the products and and joe-linux standard distribution, as well as between products and competitors linux-based products. It maximizes the value of the company and its products.

However, as I say, there is no actual policy on this (yet), hence my posts of code.

Quoted 1 line

In fact, spread it,

that's what I'm trying to do.

Quoted 2 lines

and let others do the work ^_^.

With any luck I'll be one of those "others", and paid for by my employer. We'll see...

Sam

author
#3 lore raw
Quoted 8 lines · Amin Azex
Quoted 3 lines · Jan Engelhardt

One could obtain the CD and then redistribute the GPL components, and we'd be where we are now. It does not buy the corp.s anything by limiting distribution.

Well it does.
Users have to buy the product to get _any_ of the advantages.

Sorry, I wasn't too clear here. Of course one _could_ do that, but until one does it AND merges it with the main linux tree, the differential remains, and end-users have to buy the product to get any of the advantages (if they perceive there to be any).

Sam