All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Miller <bob@computerisms.ca>
To: lartc@vger.kernel.org
Subject: HTB, IPSec, fw mark
Date: Mon, 02 Mar 2015 20:10:00 +0000	[thread overview]
Message-ID: <54F4C398.7080409@computerisms.ca> (raw)

Hello,

I read a few posts that it is possible to mark a packet with iptables, 
and then shape it as it leaves on an ipsec tunnel.  So far I am having 
limited success with the idea.

I am using libreswan with netkey.  I tried marking the packets in 
mangle/PREROUTING, but I had zero joy with that; I suspect that when the 
kernel does its netkey magic the mark is lost.  I tried marking at a 
number of other spots in the nfpacket flow, I only got results at 
mange/POSTROUTING.  But it doesn't seem to grab all the packets.

I have 6 remote users on the vpn, I give each of them a mark based on 
the IP address they get, and I mark all non-vpn packets with a 7th mark. 
  I set up 7 classes to match each mark.  I determine by the command 
`watch -n 1 -d tc -s class show dev eth0` that some packets do go 
through each class, but it is only a very small percentage of them 
(after watching it for a while now I suspect it is initial syn packets). 
  The rest all go into the 7th non-vpn class, even though I can log the 
packets marked to go to one of the vpn users.

So I am wondering if I have missed a piece of the theory, or if what I 
am trying to accomplish just isn't possible.  Perhaps it would be better 
to setup a class based on src/dst port 500, but I would like to 
guarantee each vpn user a fair share of the limited bandwidth (which I 
think pretty much requires a separate class for each user), and I am not 
sure how that can be accomplished with dynamic remote addresses.

comments or suggestions would be highly appreciated...
-- 
Computerisms
Bob Miller
867-334-7117 / 867-633-3760
http://computerisms.ca

                 reply	other threads:[~2015-03-02 20:10 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=54F4C398.7080409@computerisms.ca \
    --to=bob@computerisms.ca \
    --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.