Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: "Peter Lempel Søndergaard" <peter@sonderport.dk>
To: lartc@vger.kernel.org
Subject: [LARTC] nano-setup with fixed routes.
Date: Tue, 16 Nov 2004 12:09:01 +0000	[thread overview]
Message-ID: <1100610369.1198.32.camel@localhost> (raw)

Hi everyone,

I have a linux-box connected to an internal LAN and two
ADSL-connections. I am using the nano.txt setup with patches applied,
and everything is working fine.

My problem is that I want to route traffic to some specific hosts (DNS
and mail-servers) to a specific ADSL-line.

I have tried to add the following

ip route add 195.82.195.0/24 dev eth0 src 83.72.197.108 proto static
table 222

to the setup. This works for all traffic originating from the LAN, and
for all TCP-traffic originating from the server, but not for UDP or ICMP
from the server. This breaks totally:

ping 195.82.195.104 gives me a "Destination Host Unreachable" from the
server itself.

What should I do?

My full setup (straight from nano.txt) is as follows:

eth0 - line 1
eth1 - line 2
eth3 - internal LAN.
kernel - 2.6.8

# --- routing --------------
ip rule add prio 50 table main
ip route del default table main 2> /dev/null > /dev/null
                                                                                ip rule add prio 201 from 83.72.192.0/19 table 201
ip route add default via 83.72.192.1 dev eth0 src 83.72.197.108 proto
static table 201
ip route append prohibit default table 201 metric 1 proto static
 
ip rule add prio 202 from 10.2.0.0/24 table 202
ip route add default via 10.2.0.1 dev eth1 src 10.2.0.2 proto static
table 202
ip route append prohibit default table 202 metric 1 proto static
 
ip rule add prio 222 table 222
ip route add default table 222 proto static \
        nexthop via 83.72.192.1 dev eth0 weight 1\
        nexthop via 10.2.0.1 dev eth1 weight 1
                                                                                # --- NAT --------------------

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 83.72.197.108
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 10.2.0.2
 



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

                 reply	other threads:[~2004-11-16 12:09 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=1100610369.1198.32.camel@localhost \
    --to=peter@sonderport.dk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox