All of lore.kernel.org
 help / color / mirror / Atom feed
* Help setting up home router
@ 2015-01-08  9:39 Gonçalo Luiz
  2015-01-08 23:12 ` I-Strong, Russell J
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gonçalo Luiz @ 2015-01-08  9:39 UTC (permalink / raw)
  To: lartc

Hi,

I've been reading all the material I could get my hands on, but there
is a small detail I seem unable to get my head around. Let me show you
my setup first

1 linux PC (router) with two physical NICs: eth0 (inner facing) and
eth1 (outer facing)
many clients behind a switch to where eth0 connects to
three network namespaces in the router, whose veths bridge with eth0 in br0
one OpenVPN VPN running on the router, through which I'm sending some
traffic originating from a few source IPs. Let's call it tun0

what I want to do: apply traffic control to the outer facing,
controlling *all* the outgoing traffic. For simplicity let's assume I
want to apply the rules based solely on the source IP

my first instinct was to configure the qdiscs on eth1 egress. Seems to
me that this is the only way I can also apply the control to packets
originating in the router as they go straight away to the exit
interface (eth1).

The problem I'm facing is that the traffic that goes through tun0
presents itself to eth1, obviously, already compressed and without the
real source IP information (can come from any of the clients or
network namespaces on the router) and therefore I cannot infer what
class should assign to it. In practice, VPN turns all it's traffic
opaque and I cannot treat it differently depending on the client
originating it.

my second instinct was to shape tun0 ingress (through an IFB) along
with eth0 egress by redirecting both to an IFB and shapping it there.
Sadly this leaves traffic originating in the router itself out.

lastly I've tried to add an iptables mark to the packets that are
going through tun0 before they go through the compressing process but
it seems to be lost when they come out of the other side of it. If
they were not perhaps I could apply traffic control based on iptables
marks instead of source IPs if I marked all the packets as soon as
they land on the router or are originated in the router.

Any ideas? I fell this must be possible but am running out of ideas.

Thanks.

Gonçalo


Gonçalo Luiz

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

end of thread, other threads:[~2015-01-09 11:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08  9:39 Help setting up home router Gonçalo Luiz
2015-01-08 23:12 ` I-Strong, Russell J
2015-01-09  8:49 ` Gonçalo Luiz
2015-01-09  9:21 ` Dave Taht
2015-01-09 11:20 ` Andy Furniss

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.