All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Pattie" <pattieja@pcxperience.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] iproute + mark question
Date: Wed, 15 May 2002 16:14:36 +0000	[thread overview]
Message-ID: <marc-lartc-102147933424443@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102138771915888@msgid-missing>

Ciprian Niculescu wrote:

> i want to mark the pachets generated localy, and route them differently 

We have almost the same scenario except we need to use tcp instead of 
udp and we want to direct all port 80 traffic from the internal network 
out our new cable modem instead of using the older (slower) iDSL circuit.

> so iptables -A OUTPUT -t mangle -p udp --dport 50000:51000 -j MARK 
> --set-to 0x1

                                                                        
                            I think this          ^^^^^ needs to be 
--set-mark?

It seems that 'iptables -t mangle -A OUTPUT -p tcp --dport 80 -j MARK 
--set-mark 0x1' works, because iptables -t mangle -L -v outputs packet 
count sizes and shows that the specific rules are being matched.

> ip rule add fwmark 0x1 table 230
> ip route add default via 194... table 230 

We did exactly these steps as well (except we used table 1) and gave the 
rules a priority.  Is this maybe where we went wrong?

It just doesn't work.  The packets are being marked but are apparently 
not being dumped into the correct routing table properly.  When the 
packets that are marked are logged, they have the source address of the 
iDSL circuit instead of the cable modem because the iDSL is the default 
route for the 'main' table (I assume).  The web traffic does not work 
either.  It just seems to go out the iDSL and doesn't appear to come 
back.  Or if it does, it does not know how to route internally for some 
reason even though the source address is the iDSL which it show know 
everything it needs to know about in order to route it back into the 
internal network.

Does routing table 1 need to have routes to the internal network?  I 
wouldn't think so, but I could be mistaken.

-- 
Jason A. Pattie
pattieja@pcxperience.com



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2002-05-15 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-14 14:47 [LARTC] iproute + mark question Ciprian Niculescu
2002-05-14 15:20 ` Daniel K.
2002-05-14 15:36 ` Ciprian Niculescu
2002-05-14 15:55 ` Daniel K.
2002-05-14 16:13 ` Ciprian Niculescu
2002-05-14 16:21 ` Julian Anastasov
2002-05-15 16:14 ` Jason A. Pattie [this message]
2002-05-15 16:27 ` Ciprian Niculescu
2002-05-15 16:47 ` Jason A. Pattie

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=marc-lartc-102147933424443@msgid-missing \
    --to=pattieja@pcxperience.com \
    --cc=lartc@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.