From: Michael <michael.auckland@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] routing based on user id
Date: Mon, 18 Jul 2005 09:30:32 +0000 [thread overview]
Message-ID: <35207fdf050718023015099a2c@mail.gmail.com> (raw)
In-Reply-To: <40C4E740.9040407@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 1890 bytes --]
Hi all!
I've got 2 (soon 3) internet connection. 1 - via ADSL, 2(and3) via ppp
My network:
http://desima.objectis.net/network-diag
linux1:
user1.user2
eth0=192.168.1.1
ppp0=192.168.5.2( gw 192.168.5.1)
gw=192.168.1.2 ( thru ADSL)
compA=192.168.1.6
compB=192.168.1.15
gw2=192.168.1.217 via ppp to different ISP
All works for compA and CompB,
user1 should use default gw(192.168.1.2)
user2 should use ppp0
For user2 it will work only if I change his route thru gw2(not ppp0):
iptables -A OUTPUT -t mangle -m owner --uid-owner 1006 -j MARK --set-mark=0x1
ip rule add fwmark 0x01 table gw2
ip route add default via 192.168.1.217 table gw2
ip route flush cache
But If I change his route via ppp0 (table T2) all traffic stop for him
but will work ok for users CompA and B (using SNAT)
iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source 192.168.7.2
According to tcpdump packets going:
192.168.5.2>200.200.200.200
and back 192.168.5.2<200.200.200.200
but for some reason not reaching user2
How I can enable routing thru ppp0 for user2?
(I will need it lateer for user3 using ppp1)
Any help greatly appreciated
Configs:
ip rule ls:
0: from all lookup local
32750: from all fwmark 0x1 lookup T2
32751: from 192.168.5.2 lookup T2
32752: from 192.168.5.1 lookup T2
32756: from 192.168.1.6 lookup T1
32757: from 192.168.1.15 lookup T2
32766: from all lookup main
32767: from all lookup default
ip route table T2
192.168.5.0 dev ppp0 scope link src 192.168.5.2
192.168.1.0/24 dev eth0 scope link
127.0.0.0/8 dev lo scope link
default via 192.168.5.1 dev ppp0
ip route ls
192.168.1.0 dev eth0 scope link src 192.168.1.1
192.168.5.1 dev ppp0 proto kernel scope link src 192.168.5.2
203.97.61.42 via 192.168.1.2 dev eth0
192.168.1.0/24 dev eth0 scope link
127.0.0.0/8 dev lo scope link
default via 192.168.1.2 dev eth0
[-- Attachment #2: local-map.png --]
[-- Type: image/png, Size: 27314 bytes --]
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
prev parent reply other threads:[~2005-07-18 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-07 22:08 [LARTC] Routing based on user id Jürgen Jacob
2004-06-08 8:40 ` Anton Glinkov
2005-07-17 23:22 ` [LARTC] routing " MIchael
2005-07-18 9:30 ` Michael [this message]
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=35207fdf050718023015099a2c@mail.gmail.com \
--to=michael.auckland@gmail.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.