All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pawel <pzlist@mp.pl>
To: netfilter@vger.kernel.org
Subject: routing based on MARK problem
Date: Tue, 09 Oct 2007 13:49:02 +0200	[thread overview]
Message-ID: <470B6AAE.70400@mp.pl> (raw)

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







                 reply	other threads:[~2007-10-09 11:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=470B6AAE.70400@mp.pl \
    --to=pzlist@mp.pl \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.