All of lore.kernel.org
 help / color / mirror / Atom feed
* routing based on MARK problem
@ 2007-10-09 11:49 Pawel
  0 siblings, 0 replies; only message in thread
From: Pawel @ 2007-10-09 11:49 UTC (permalink / raw)
  To: netfilter

Hi all,

In my network routing based on MARK do not work. Return packets (SYN - 
ACK) do not reach client.


My network :


local area -------
                         |
                         |--------------eth0 server eth1 -------------- 
provider 1
                         |
external  N------ 
I want to assure access to "external N " from "local area"
I prepared new routing table :

ip rule add fwmark 5 table EXTERNAL
ip route add default via $EXTERNAL_NETWORK_GW_IP dev eth0 table EXTERNAL

next iptable rules:

iptables -t nat PREROUTING -t mangle -i eth0 [DST PORT/ADDRESSES RULES] 
-j MARK  --set-mark 5
to disable NAT and redirection to proxy:

iptables -t nat PREROUTING -m mark --mark 5 -j ACCPET
iptables -t nat POSTROUTING -m mark --mark 5 -j ACCPET

tcpdump on "server"  shows:
"local area IP " > "external N IP"  SYNC
"local area IP" > "external N IP"  SYNC
"external N IP"  > "local area IP " SYNC ACK

last packet appears only once  - that packet to not each host in local area

accept_reidirection and send_reisrections are disabled


What is wrong ?
Thanks for any suggestions.

Pawel







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-09 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-09 11:49 routing based on MARK problem Pawel

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.