All of lore.kernel.org
 help / color / mirror / Atom feed
* 2 ISPs again
@ 2004-12-10 19:03 Andreas Grabner
  2004-12-10 19:20 ` Jason Opperisano
  2004-12-11 13:06 ` Andreas Grabner
  0 siblings, 2 replies; 8+ messages in thread
From: Andreas Grabner @ 2004-12-10 19:03 UTC (permalink / raw)
  To: netfilter

Hi,
i try to get the following work for days now and realy need some hints.
My situaution:
I have 2 independent links to the internet. I would like to get
connections from the internet to an internal host work, regardless to
which of my external IP.
I tried it by marking packets coming in EXTIF1 and set up a own routing
table for marked packets. But it seems the routing does not work bacause
teh packets disappear between PREROUTING and FORWARD.
Please help!

Some config lines:
# ip rule ls
0:      from all lookup local
32765:  from all fwmark        1 lookup post.out
32766:  from all lookup main
32767:  from all lookup default

# ip ro sh tab post.out
192.168.100.0/24 dev eth0  scope link  src 192.168.100.3
default via EXTIP2 dev eth2

# iptables -L -nv -t mangle
1624  113K MARK       all  --  eth2   *       0.0.0.0/0
0.0.0.0/0           MARK set 0x1
Thanks for any Tips, Documentation links ...

Andreas Grabner




^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: 2 ISPs again
@ 2004-12-10 19:28 Daniel Chemko
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Chemko @ 2004-12-10 19:28 UTC (permalink / raw)
  To: Andreas Grabner; +Cc: netfilter

Andreas Grabner wrote:
> Thanks a lot for your reply!!!
> 
>> If your own IP's on the firewall aren't bound to the network, you'll
> What does                                 ^^^^^^^^^^^^^^^^^^^^^ this
> mean? 

Think about in the terms of promisc vs. non-promisc modes in tcpdump.

If the kernel doesn't know what IP addresses to properly receive data
on, the kernel will either let everything in or silently throw them
away. RP_filter is the mechanism used to protect routing integrity.
Since there is no IP, or an incorrect IP associated with the incoming
packet, it gets tossed. If you turn off the rp_filter, you're saying
that you want to receive all data incoming to the interface even if it
shouldn't be there.

EG: 

INET - eth1 - FW - eth0 -INTERNAL (192.168.1.0/24)

If you receive an inbound connection request from the internet from the
source address 192.168.1.2, the rp_filter will drop the packet flat.
There may be issues with having your two internet interfaces. Maybe
they're expecting traffic on one another.  

Question:

1. Are either inbound connections working, or do they both die? 
2. Do you see your DNAT counter increment when the packet comes in?
3. Can you confirm that the destination in the DNAT is correct from the
firewall? Make sure that the route on the firewall can properly get to
the target machine.


^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: 2 ISPs again
@ 2004-12-10 19:06 Daniel Chemko
  2004-12-10 19:17 ` Andreas Grabner
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Chemko @ 2004-12-10 19:06 UTC (permalink / raw)
  To: Andreas Grabner, netfilter

Andreas Grabner wrote:
> Hi,
> i try to get the following work for days now and realy need some
> hints. My situaution:
> I have 2 independent links to the internet. I would like to get
> connections from the internet to an internal host work, regardless to
> which of my external IP.
> I tried it by marking packets coming in EXTIF1 and set up a own
> routing table for marked packets. But it seems the routing does not
> work bacause teh packets disappear between PREROUTING and FORWARD.
> Please help!

If your own IP's on the firewall aren't bound to the network, you'll
have to disable rp_filtering. echo "0" >
/proc/sys/net/ipv4/eth_whatever/rp_filter

You'll also want to make sure outgoing packets are getting natted
correctly (if you're natting). Routing the reply usually requires
connmark to work properly.



^ permalink raw reply	[flat|nested] 8+ messages in thread
* 2 ISPs again
@ 2004-12-10 17:58 Andreas Grabner
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Grabner @ 2004-12-10 17:58 UTC (permalink / raw)
  To: netfilter

Hi,
i try to get the following work for days now and realy need some hints.
My situaution:
I have 2 independent links to the internet. I would like to get
connections from the internet to an internal host work, regardless to
which of my external IP.
I tried it by marking packets coming in EXTIF1 and set up a own routing
table for marked packets. But it seems the routing does not work bacause
teh packets disappear between PREROUTING and FORWARD.
Please help!

Some config lines:
# ip rule ls
0:      from all lookup local
32765:  from all fwmark        1 lookup post.out
32766:  from all lookup main
32767:  from all lookup default

# ip ro sh tab post.out
192.168.100.0/24 dev eth0  scope link  src 192.168.100.3
default via EXTIP2 dev eth2

# iptables -L -nv -t mangle
1624  113K MARK       all  --  eth2   *       0.0.0.0/0           
0.0.0.0/0           MARK set 0x1
Thanks for any Tips, Documentation links ...

Andreas Grabner




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

end of thread, other threads:[~2004-12-11 13:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-10 19:03 2 ISPs again Andreas Grabner
2004-12-10 19:20 ` Jason Opperisano
2004-12-11 13:06 ` Andreas Grabner
2004-12-11 13:31   ` Jason Opperisano
  -- strict thread matches above, loose matches on Subject: below --
2004-12-10 19:28 Daniel Chemko
2004-12-10 19:06 Daniel Chemko
2004-12-10 19:17 ` Andreas Grabner
2004-12-10 17:58 Andreas Grabner

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.