All of lore.kernel.org
 help / color / mirror / Atom feed
* Routing decision?
@ 2003-09-15 13:16 Wim Ceulemans
  2003-09-15 14:34 ` Henrik Nordstrom
  0 siblings, 1 reply; 24+ messages in thread
From: Wim Ceulemans @ 2003-09-15 13:16 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 827 bytes --]

Hi

In paragraph 6.2 of the iptables-tutorial the following is said:
"The OUTPUT chain is used for altering locally generated packets (i.e., 
on the firewall) before they get to the routing decision.

But in paragraph 3.1, the "Traversing of tables and chains" diagram, we 
see the "Routing decision" is listed after the "Local process" and
BEFORE! the packet goes to the output chain.

So which one is right? Does the routing decision take place after or 
before the packet travels through the output chain?

Regards

-- 
Wim Ceulemans
R&D Engineer

Secure Internet Communication with aXs Guard

Able NV
Leuvensesteenweg 282 - B-3190 Boortmeerbeek - Belgium
Phone: + 32 15 50.44.00 - Fax: + 32 15 50.44.09
E-mail: wim.ceulemans@able.be



--
Security check on this e-mail has been done by aXs GUARD
(http://www.axsguard.com)


^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: Routing decision?
@ 2003-09-15 20:10 Daniel Chemko
  2003-09-15 22:32 ` Henrik Nordstrom
  0 siblings, 1 reply; 24+ messages in thread
From: Daniel Chemko @ 2003-09-15 20:10 UTC (permalink / raw)
  To: Henrik Nordstrom, Wim Ceulemans; +Cc: netfilter-devel, pieter

I am trying to do something very similarly. I am having a heck of a time
managing to get this all working properly. 

Setup:
Two interfaces: eth0(default), eth2

# Add routing table entries for eth2
ip route add default via <my isp gw> src <myip> dev eth2 table 100
ip rule add fwmark 1 table 100

# Add rule to forward to ISP #2
iptables -t mangle -A OUTPUT -p tcp --dport 80 -m state --state NEW -j
MARK --set-mark 1

The traffic is getting routed out of eth2, but any ARP requests sent out
of eth2 has the respond to field set too the IP address mapped to eth0.
Is there an ARP source address flag that isn't getting set right, or is
it just my wacky configuration?

I am using this with squid in userspace, and I am unaware of any way to
get squid to bind its outbound interface. If I could bind to just an IP
address which is normally the case, I still can't function without
hacking because the interfaces are on DHCP.

Sorry for the question in devel, but Netfilter general didn't come up
with a solution.


-----Original Message-----
From: Henrik Nordstrom [mailto:hno@marasystems.com] 
Sent: Monday, September 15, 2003 12:49 PM
To: Wim Ceulemans
Cc: netfilter-devel@lists.netfilter.org; pieter@able.be
Subject: Re: Routing decision?

On Mon, 15 Sep 2003, Wim Ceulemans wrote:

> Here's why: if you want to mark packets in the OUTPUT chain that are
> http traffic, based on the destination port. And then based on that
mark
> send the packets to another routing table added with the ip command.

Then do so. iptables will make the needed re-routing of the packet when 
the nfmark is modified.

But you can't use this to select the source IP address as this has
already
been done and must be done before the packet is constructed (and sent to
iptables), however you can use NAT to rewrite the source IP address if
not
assigned suitably or alternaively (preferred) have the application use a
suitable source IP address to begin with.

Regards
Henrik

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Routing decision?
@ 2003-09-15  8:49 Wim Ceulemans
  2003-09-15  9:08 ` Ray Leach
  0 siblings, 1 reply; 24+ messages in thread
From: Wim Ceulemans @ 2003-09-15  8:49 UTC (permalink / raw)
  To: netfilter; +Cc: pieter

[-- Attachment #1: Type: text/plain, Size: 827 bytes --]

Hi

In paragraph 6.2 of the iptables-tutorial the following is said:
"The OUTPUT chain is used for altering locally generated packets (i.e., 
on the firewall) before they get to the routing decision.

But in paragraph 3.1, the "Traversing of tables and chains" diagram, we 
see the "Routing decision" is listed after the "Local process" and
BEFORE! the packet goes to the output chain.

So which one is right? Does the routing decision take place after or 
before the packet travels through the output chain?

Regards

-- 
Wim Ceulemans
R&D Engineer

Secure Internet Communication with aXs Guard

Able NV
Leuvensesteenweg 282 - B-3190 Boortmeerbeek - Belgium
Phone: + 32 15 50.44.00 - Fax: + 32 15 50.44.09
E-mail: wim.ceulemans@able.be



--
Security check on this e-mail has been done by aXs GUARD
(http://www.axsguard.com)


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

end of thread, other threads:[~2003-09-18 13:39 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-15 13:16 Routing decision? Wim Ceulemans
2003-09-15 14:34 ` Henrik Nordstrom
2003-09-15 15:29   ` Wim Ceulemans
2003-09-15 16:06     ` Henrik Nordstrom
2003-09-15 16:25       ` Wim Ceulemans
2003-09-15 16:59         ` Cedric Blancher
2003-09-15 19:48         ` Henrik Nordstrom
2003-09-18  7:37       ` Wim Ceulemans
2003-09-18 11:22         ` Henrik Nordstrom
2003-09-18 11:54           ` Wim Ceulemans
2003-09-18 13:10             ` Henrik Nordstrom
2003-09-18 13:39               ` Wim Ceulemans
  -- strict thread matches above, loose matches on Subject: below --
2003-09-15 20:10 Daniel Chemko
2003-09-15 22:32 ` Henrik Nordstrom
2003-09-15  8:49 Wim Ceulemans
2003-09-15  9:08 ` Ray Leach
2003-09-15 10:44   ` Wim Ceulemans
2003-09-15 12:14     ` Ray Leach
2003-09-15 12:53       ` Wim Ceulemans
2003-09-15 13:09         ` Ray Leach
2003-09-15 13:31           ` Cedric Blancher
2003-09-15 13:46             ` Ray Leach
2003-09-15 14:00               ` Cedric Blancher
2003-09-15 15:03                 ` Ray Leach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.