IPR2 + Netfilter: stateful _routing_ on inbound DNAT, in dual-homed setup?

This is a discussion on IPR2 + Netfilter: stateful _routing_ on inbound DNAT, in dual-homed setup? within the Linux Networking forums, part of the Linux Forums category; Dear Everyone, I'm preparing to upgrade our firewall. We're a small business with a fairly basic IP networking ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-20-2007
Frantisek.Rysanek@post.cz
 
Posts: n/a
Default IPR2 + Netfilter: stateful _routing_ on inbound DNAT, in dual-homed setup?

Dear Everyone,

I'm preparing to upgrade our firewall.
We're a small business with a fairly basic IP networking setup. Our
firewall's got three ports: outside, public DMZ and a privately
numbered inside. We have recently obtained a second uplink (internet
connectivity) and my first task would be to make use of it - which in
traditional IP theory is next to nonsense. Originally I thought of
using two firewalls, and shifting the default route of my internal LAN
stations via a DHCP configuration update. Then I discovered the
primers on IProute2-based policy routing, and decided that I could
achieve the same with a single box, steered by two routing tables. I
knew about policy routing from my past Cisco experience, and on Linux/
PC-based routers you don't even have to care about the CPU overhead,
so this was a
no-brainer.

http://www.fccps.cz/download/adv/frr/FW.gif

My current firewall uses some Netfilter-based stateful NAT and
filtering. It works pretty good and I've written the rules from
scratch, I understand the semantics fairly well.

After reading the somewhat bloated IProute2 primers, and after
understanding that Netfilter NAT doesn't mix well with IPR2 NAT, one
nagging idea/question remains on my mind:

I know that Netfilter can do seamless stateful filtering of traffic
returning back through NAT. If I set up two uplinks with a NAT
"horizon split" on each of them, it shouldn't be a problem to route
traffic to either interface by merely modifying the default route (for
manual fail-over), or even by using multiple default routes with IPR2
per-flow balancing mechanisms - and I won't create a routing loop, as
my public outbound source address will always belong to the respective
ISP, courtesy of the twin NAT outside's.

Now what about *inbound* traffic? Suppose I've got a web server in the
DMZ. I'm wondering about possible fail-over setups with the two ISP
uplinks. I could set up two SNAT rules in the Netfilter's PREROUTING
table, one rule for each outside interface, both of them pointing to
the internal IP address of my web server. This would work for the
inbound packets, but how would the FW box deal with the returning
outbound traffic? I know that the Netfilter NAT can observe the
stateful information for filtering, but will IPR2 be able to observe
that information for *routing*? Not likely, I'd say. Never heard of
stateful *routing*. The necessary kernel guts could actually be quite
similar to the existing IPR2 per-flow balancing stuff, but I doubt
that this (dual-path stateful routing on NAT return traffic) would
work somehow seamlessly, out of the box, in the current incarnation of
IPR2+Netfilter... Obviously I can do without it, but it would be a
nice final touch :-)

Any ideas are welcome :-)

Frank Rysanek

Reply With Quote
  #2 (permalink)  
Old 07-22-2007
Clifford Kite
 
Posts: n/a
Default Re: IPR2 + Netfilter: stateful _routing_ on inbound DNAT, in dual-homed setup?

Frantisek.Rysanek@post.cz wrote:

> Now what about *inbound* traffic? Suppose I've got a web server in the
> DMZ. I'm wondering about possible fail-over setups with the two ISP
> uplinks. I could set up two SNAT rules in the Netfilter's PREROUTING
> table, one rule for each outside interface, both of them pointing to
> the internal IP address of my web server. This would work for the
> inbound packets, but how would the FW box deal with the returning
> outbound traffic?


According to the iptables man pages here SNAT is only valid for the nat
table's POSTROUTING chain.

--
Clifford Kite
/* "Be liberal in what you accept, and conservative in what you send"
RFC 1122 */
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:01 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0