* [LARTC] need help on multiple isp routing
2005-09-29 7:37 [LARTC] need help on multiple isp routing Anonymous
@ 2005-09-29 9:23 ` Anonymous
2005-09-30 6:32 ` hareram
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Anonymous @ 2005-09-29 9:23 UTC (permalink / raw)
To: lartc
here's my network layout
ppp0 (ADSL 2048/256)
|
| ppp1 (SDSL 1024/1024)
| |
-------- LINUX -------
|
eth0 (192.168.0.1 DHCP+DNS, Squid, Samba)
|
|
-----8 port 100mbit dumb switch
| | | | |
192.168.0.16/26 | | |
| | - DHCP
assigned clients
| ---
(192.168.0.0/26)
-----
i need 192.168.0.16 to take ppp0 route for all it's needs (masquaraded on
ppp0) and use transparent squid cache set up on 192.168.0.1 for www. while
all other DHCP assigned clients would use masquerading on ppp1 for all their
needs and use forced load-ballanced cache of second ISP.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] need help on multiple isp routing
2005-09-29 7:37 [LARTC] need help on multiple isp routing Anonymous
2005-09-29 9:23 ` Anonymous
@ 2005-09-30 6:32 ` hareram
2005-09-30 7:35 ` Anonymous
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hareram @ 2005-09-30 6:32 UTC (permalink / raw)
To: lartc
Hi
This Link may help you
http://linux.com.lb/wiki/index.pl?node=Load%20Balancing%20Across%20Multiple%20Links
hare
----- Original Message -----
From: "Anonymous" <netmon@hot.ee>
To: <lartc@mailman.ds9a.nl>
Sent: Thursday, September 29, 2005 2:53 PM
Subject: [LARTC] need help on multiple isp routing
> here's my network layout
>
>
> ppp0 (ADSL 2048/256)
> |
> | ppp1 (SDSL 1024/1024)
> | |
> -------- LINUX -------
> |
> eth0 (192.168.0.1 DHCP+DNS, Squid, Samba)
> |
> |
> -----8 port 100mbit dumb switch
> | | | | |
> 192.168.0.16/26 | | |
> | | - DHCP
> assigned clients
> | ---
> (192.168.0.0/26)
> -----
>
> i need 192.168.0.16 to take ppp0 route for all it's needs (masquaraded on
> ppp0) and use transparent squid cache set up on 192.168.0.1 for www. while
> all other DHCP assigned clients would use masquerading on ppp1 for all
> their needs and use forced load-ballanced cache of second ISP.
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>
>
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] need help on multiple isp routing
2005-09-29 7:37 [LARTC] need help on multiple isp routing Anonymous
2005-09-29 9:23 ` Anonymous
2005-09-30 6:32 ` hareram
@ 2005-09-30 7:35 ` Anonymous
2005-09-30 7:55 ` hareram
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Anonymous @ 2005-09-30 7:35 UTC (permalink / raw)
To: lartc
thank you very much for your reply! i've red your article even it mention a
50x50 multipath load ballance (am i right?) solution which is not exactly
what i need. now i begin to realize how wrong i was. but i need more like a
"split" kind of access with 2 different ISPs - 1 ISP for just 1 PC
(192.168.0.16), and then another ISP for all the other clients
(192.168.0.0/26). anyway your article is kinda helpfull. i don't give up on
split access idea, even i already spent 3 days of my 6 day vacation trying
to configure it. i still have 3 days more! :)
----- Original Message -----
From: "hareram" <hareram@sol.net.in>
To: "Anonymous" <netmon@hot.ee>; <lartc@mailman.ds9a.nl>
Sent: Friday, September 30, 2005 9:20 AM
Subject: Re: [LARTC] need help on multiple isp routing
> Hi
>
> This Link may help you
>
> http://linux.com.lb/wiki/index.pl?node=Load%20Balancing%20Across%20Multiple%20Links
>
> hare
> ----- Original Message -----
> From: "Anonymous" <netmon@hot.ee>
> To: <lartc@mailman.ds9a.nl>
> Sent: Thursday, September 29, 2005 2:53 PM
> Subject: [LARTC] need help on multiple isp routing
>
>
>> here's my network layout
>>
>>
>> ppp0 (ADSL 2048/256)
>> |
>> | ppp1 (SDSL 1024/1024)
>> | |
>> -------- LINUX -------
>> |
>> eth0 (192.168.0.1 DHCP+DNS, Squid, Samba)
>> |
>> |
>> -----8 port 100mbit dumb switch
>> | | | | |
>> 192.168.0.16/26 | | |
>> | | - DHCP
>> assigned clients
>> | ---
>> (192.168.0.0/26)
>> -----
>>
>> i need 192.168.0.16 to take ppp0 route for all it's needs (masquaraded on
>> ppp0) and use transparent squid cache set up on 192.168.0.1 for www.
>> while all other DHCP assigned clients would use masquerading on ppp1 for
>> all their needs and use forced load-ballanced cache of second ISP.
>> _______________________________________________
>> LARTC mailing list
>> LARTC@mailman.ds9a.nl
>> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>>
>>
>
>
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] need help on multiple isp routing
2005-09-29 7:37 [LARTC] need help on multiple isp routing Anonymous
` (2 preceding siblings ...)
2005-09-30 7:35 ` Anonymous
@ 2005-09-30 7:55 ` hareram
2005-10-01 19:13 ` Anonymous
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hareram @ 2005-09-30 7:55 UTC (permalink / raw)
To: lartc
Hi
the best way to do is
Source route Routing and Masq
hare
----- Original Message -----
From: "Anonymous" <netmon@hot.ee>
To: "LARTC" <lartc@mailman.ds9a.nl>
Sent: Friday, September 30, 2005 1:05 PM
Subject: Re: [LARTC] need help on multiple isp routing
> thank you very much for your reply! i've red your article even it mention
> a 50x50 multipath load ballance (am i right?) solution which is not
> exactly what i need. now i begin to realize how wrong i was. but i need
> more like a "split" kind of access with 2 different ISPs - 1 ISP for just
> 1 PC (192.168.0.16), and then another ISP for all the other clients
> (192.168.0.0/26). anyway your article is kinda helpfull. i don't give up
> on split access idea, even i already spent 3 days of my 6 day vacation
> trying to configure it. i still have 3 days more! :)
>
> ----- Original Message -----
> From: "hareram" <hareram@sol.net.in>
> To: "Anonymous" <netmon@hot.ee>; <lartc@mailman.ds9a.nl>
> Sent: Friday, September 30, 2005 9:20 AM
> Subject: Re: [LARTC] need help on multiple isp routing
>
>
>> Hi
>>
>> This Link may help you
>>
>> http://linux.com.lb/wiki/index.pl?node=Load%20Balancing%20Across%20Multiple%20Links
>>
>> hare
>> ----- Original Message -----
>> From: "Anonymous" <netmon@hot.ee>
>> To: <lartc@mailman.ds9a.nl>
>> Sent: Thursday, September 29, 2005 2:53 PM
>> Subject: [LARTC] need help on multiple isp routing
>>
>>
>>> here's my network layout
>>>
>>>
>>> ppp0 (ADSL 2048/256)
>>> |
>>> | ppp1 (SDSL 1024/1024)
>>> | |
>>> -------- LINUX -------
>>> |
>>> eth0 (192.168.0.1 DHCP+DNS, Squid, Samba)
>>> |
>>> |
>>> -----8 port 100mbit dumb switch
>>> | | | | |
>>> 192.168.0.16/26 | | |
>>> | | - DHCP
>>> assigned clients
>>> | ---
>>> (192.168.0.0/26)
>>> -----
>>>
>>> i need 192.168.0.16 to take ppp0 route for all it's needs (masquaraded
>>> on ppp0) and use transparent squid cache set up on 192.168.0.1 for www.
>>> while all other DHCP assigned clients would use masquerading on ppp1 for
>>> all their needs and use forced load-ballanced cache of second ISP.
>>> _______________________________________________
>>> LARTC mailing list
>>> LARTC@mailman.ds9a.nl
>>> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>>>
>>>
>>
>>
>
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>
>
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] need help on multiple isp routing
2005-09-29 7:37 [LARTC] need help on multiple isp routing Anonymous
` (3 preceding siblings ...)
2005-09-30 7:55 ` hareram
@ 2005-10-01 19:13 ` Anonymous
2005-10-03 14:37 ` Anonymous
2005-10-03 15:38 ` /dev/rob0
6 siblings, 0 replies; 8+ messages in thread
From: Anonymous @ 2005-10-01 19:13 UTC (permalink / raw)
To: lartc
could someone take a fresh look at my configuration and then tell me where
from i took the wrong turn.
yes, outgoing packets take different routes/gateways based on a ip
fwmark/iptables mark. at least i believe they do. but when i run an iftop
session (one per each of ppp interfaces) i see that packets (with correct
outgoing ip) going out and get replies only on ppp0, while ppp1 only send
(outgoing ip'a also correct) and recieve but doesn't forward. some mistake i
did in filter input/forward nat prerouting, huh? i don't get it... should i
somehow mark incoming packets as well? i'm lost :( or drop packets from ppp0
on ppp1 and then ppp1 on ppp0?
#!/bin/sh
PPP=(ppp0 ppp1)
IP=(`ifconfig ${PPP[0]}|sed -n 2p|column -s ":" -t|awk '{print $3}'`
`ifconfig ${PPP[1]}|sed -n 2p|column -s ":" -t|awk '{print $3}'`)
GATEWAY=(`ifconfig ${PPP[0]}|sed -n 2p|column -s ":" -t|awk '{print $5}'`
`ifconfig ${PPP[1]}|sed -n 2p|column -s ":" -t|awk '{print $5}'`)
route del default
ip route flush table auxiliary
ip route show table main | grep -Ev ^default \
| while read ROUTE ; do
ip route add table auxiliary $ROUTE
done
ip route add table auxiliary default via ${GATEWAY[1]} dev ${PPP[1]}
ip route add table main default via ${GATEWAY[0]} dev ${PPP[0]}
ip rule add fwmark 252 table auxiliary
ip rule add fwmark 254 table main
iptables -F
iptables -F -t nat
iptables -F -t mangle
iptables -A INPUT -i ppp+ -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i ppp1 -p tcp -m tcp --dport 20 -j ACCEPT
iptables -A INPUT -i ppp1 -p tcp -m tcp --dport 21 -j ACCEPT
iptables -A INPUT -i ppp0 -p udp -m udp --dport 53 -j ACCEPT
iptables -A INPUT -i ppp+ -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -i ppp0 -p udp -m udp --dport 123 -j ACCEPT
iptables -A INPUT -i ppp1 -p tcp -m tcp --dport 55000:55500 -j ACCEPT
iptables -A INPUT -i ppp+ -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i ppp+ -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i ppp0 -p tcp -m tcp --dport 4662 -j ACCEPT
iptables -A FORWARD -i ppp1 -p tcp -m tcp --dport 4663 -j ACCEPT
iptables -A FORWARD -i ppp0 -p udp -m udp --dport 4672 -j ACCEPT
iptables -A FORWARD -i ppp1 -p udp -m udp --dport 4673 -j ACCEPT
iptables -A FORWARD -i ppp0 -p tcp -m tcp --dport 5000:5010 -j ACCEPT
iptables -A FORWARD -i ppp0 -p tcp -m tcp --dport 15402 -j ACCEPT
iptables -A FORWARD -i ppp0 -p udp -m udp --dport 15402 -j ACCEPT
iptables -A FORWARD -i ppp+ -m state --state NEW,INVALID -j DROP
iptables -t mangle -A PREROUTING -s 192.168.0.62 -j MARK --set-mark 252
iptables -t mangle -A PREROUTING -s 192.168.0.16 -j MARK --set-mark 254
iptables -t mangle -A PREROUTING -p icmp -m icmp -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK
ACK -m length --length 0:128 -j TOS --set-tos Minimize-Delay
iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK
ACK -m length --length 128: -j TOS --set-tos Maximize-Throughput
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 20 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 21 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 22 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A PREROUTING -p udp -m udp --sport 53 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 80 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A PREROUTING -p udp -m udp --sport 123 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A OUTPUT -p icmp -m icmp -j TOS --set-tos Minimize-Delay
iptables -t mangle -A OUTPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK ACK -m
length --length 0:128 -j TOS --set-tos Minimize-Delay
iptables -t mangle -A OUTPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK ACK -m
length --length 128: -j TOS --set-tos Maximize-Throughput
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 20 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 21 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 22 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A OUTPUT -p udp -m udp --dport 53 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 80 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A OUTPUT -p udp -m udp --dport 123 -j TOS --set-tos
Minimize-Delay
iptables -t nat -A PREROUTING -i ppp0 -p tcp -m tcp --dport 4662 -j
DNAT --to 192.168.0.16:4662
iptables -t nat -A PREROUTING -i ppp1 -p tcp -m tcp --dport 4663 -j
DNAT --to 192.168.0.62:4663
iptables -t nat -A PREROUTING -i ppp0 -p udp -m udp --dport 4672 -j
DNAT --to 192.168.0.16:4672
iptables -t nat -A PREROUTING -i ppp1 -p udp -m udp --dport 4673 -j
DNAT --to 192.168.0.62:4673
iptables -t nat -A PREROUTING -i ppp0 -p tcp -m tcp --dport 5000:5010 -j
DNAT --to 192.168.0.16:5000-5010
iptables -t nat -A PREROUTING -i ppp0 -p tcp -m tcp --dport 15402 -j
DNAT --to 192.168.0.16:15402
iptables -t nat -A PREROUTING -i ppp0 -p udp -m udp --dport 15402 -j
DNAT --to 192.168.0.16:15402
iptables -t nat -A PREROUTING -i eth2 -p tcp -m tcp -s 192.168.0.16 --dport
80 -j DNAT --to 192.168.0.1:3128
#iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.16 -j MASQUERADE
#iptables -t nat -A POSTROUTING -o ppp1 -s 192.168.0.62 -j MASQUERADE
iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.16 -j SNAT --to ${IP[0]}
iptables -t nat -A POSTROUTING -o ppp1 -s 192.168.0.62 -j SNAT --to ${IP[1]}
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] need help on multiple isp routing
2005-09-29 7:37 [LARTC] need help on multiple isp routing Anonymous
` (4 preceding siblings ...)
2005-10-01 19:13 ` Anonymous
@ 2005-10-03 14:37 ` Anonymous
2005-10-03 15:38 ` /dev/rob0
6 siblings, 0 replies; 8+ messages in thread
From: Anonymous @ 2005-10-03 14:37 UTC (permalink / raw)
To: lartc
i finally made it! yeeee-ha! it works! the only thing i have to configure is
how to make those 2 links to use their own DNS servers, as ISP's1 servers do
not answer queries from ISP's2 ip address and vise versa. i run BIND (as
caching and also for my local zone) on my router configured to forward
requests to ISP's1 DNS servers. i really don't want to run 2 copies of BIND
with forwarders of ISP2 as the only difference in configuration. would
anybody come up with a more elegant solution on that issue? i'm sure it is
not nice to specify both ISP's servers as forwarders for a single server as
the server itself uses default gateway of ISP1. and then about services
installed on a router machine itself - ftp, www. they do not seem to listen
on ISP's2 ip. any solution besides configuring virtual servers?
here's my firewall script. i'd like if someone would correct me. especially
on mangle table as i'm still not sure if i mark packets correctly.
#!/bin/sh
PPP=(ppp0 ppp1)
IP=(`ifconfig ${PPP[0]}|sed -n 2p|column -s ":" -t|awk '{print $3}'`
`ifconfig ${PPP[1]}|sed -n 2p|column -s ":" -t|awk '{print $3}'`)
GATEWAY=(`ifconfig ${PPP[0]}|sed -n 2p|column -s ":" -t|awk '{print $5}'`
`ifconfig ${PPP[1]}|sed -n 2p|column -s ":" -t|awk '{print $5}'`)
ip route flush table auxiliary
ip route show table main | grep -Ev ^default \
| while read ROUTE ; do
ip route add table auxiliary $ROUTE
done
ip route add table auxiliary default via ${GATEWAY[1]} dev ${PPP[1]}
ip rule add fwmark 0xfc table auxiliary
echo 0 > /proc/sys/net/ipv4/conf/${PPP[0]}/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/${PPP[1]}/rp_filter
iptables -F
iptables -F -t nat
iptables -F -t mangle
iptables -A INPUT -i ppp+ -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i ${PPP[1]} -p tcp -m tcp --dport 20 -j ACCEPT
iptables -A INPUT -i ${PPP[1]} -p tcp -m tcp --dport 21 -j ACCEPT
iptables -A INPUT -i ${PPP[0]} -p udp -m udp --dport 53 -j ACCEPT
iptables -A INPUT -i ${PPP[1]} -p udp -m udp --dport 53 -j ACCEPT
iptables -A INPUT -i ${PPP[0]} -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -i ${PPP[0]} -p udp -m udp --dport 123 -j ACCEPT
iptables -A INPUT -i ${PPP[1]} -p tcp -m tcp --dport 55000:55500 -j ACCEPT
iptables -A INPUT -i ppp+ -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i ppp+ -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i ${PPP[0]} -p tcp -m tcp --dport 4662 -j ACCEPT
iptables -A FORWARD -i ${PPP[0]} -p tcp -m tcp --dport 4663 -j ACCEPT
iptables -A FORWARD -i ${PPP[0]} -p udp -m udp --dport 4672 -j ACCEPT
iptables -A FORWARD -i ${PPP[0]} -p udp -m udp --dport 4673 -j ACCEPT
iptables -A FORWARD -i ${PPP[0]} -p tcp -m tcp --dport 5000:5010 -j ACCEPT
iptables -A FORWARD -i ${PPP[0]} -p tcp -m tcp --dport 15402 -j ACCEPT
iptables -A FORWARD -i ${PPP[0]} -p udp -m udp --dport 15402 -j ACCEPT
iptables -A FORWARD -i ${PPP[1]} -p tcp -m tcp --dport 15502 -j ACCEPT
iptables -A FORWARD -i ${PPP[1]} -p udp -m udp --dport 15502 -j ACCEPT
iptables -A FORWARD -i ppp+ -m state --state NEW,INVALID -j DROP
iptables -t mangle -A PREROUTING -s 192.168.0.59 -j MARK --set-mark 252
###
iptables -t mangle -A PREROUTING -p icmp -m icmp -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK
ACK -m length --length 0:128 -j TOS --set-tos Minimize-Delay
iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK
ACK -m length --length 128: -j TOS --set-tos Maximize-Throughput
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 20 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 21 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 22 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A PREROUTING -p udp -m udp --sport 53 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 80 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A PREROUTING -p udp -m udp --sport 123 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A INPUT -i ${PPP[1]} -j MARK --set-mark 252
#iptables -t mangle -A FORWARD -d 192.168.0.59 -j MARK --set-mark 252
iptables -t mangle -A OUTPUT -o ${PPP[1]} -j MARK --set-mark 252
iptables -t mangle -A OUTPUT -p icmp -m icmp -j TOS --set-tos Minimize-Delay
iptables -t mangle -A OUTPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK ACK -m
length --length 0:128 -j TOS --set-tos Minimize-Delay
iptables -t mangle -A OUTPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK ACK -m
length --length 128: -j TOS --set-tos Maximize-Throughput
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 20 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 21 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 22 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A OUTPUT -p udp -m udp --dport 53 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 80 -j TOS --set-tos
Maximize-Throughput
iptables -t mangle -A OUTPUT -p udp -m udp --dport 123 -j TOS --set-tos
Minimize-Delay
iptables -t mangle -A POSTROUTING -s 192.168.0.59 -j MARK --set-mark 252
iptables -t nat -A PREROUTING -i ${PPP[0]} -p tcp -m tcp --dport 4662 -j
DNAT --to 192.168.0.16:4662
iptables -t nat -A PREROUTING -i ${PPP[0]} -p tcp -m tcp --dport 4663 -j
DNAT --to 192.168.0.62:4663
iptables -t nat -A PREROUTING -i ${PPP[0]} -p udp -m udp --dport 4672 -j
DNAT --to 192.168.0.16:4672
iptables -t nat -A PREROUTING -i ${PPP[0]} -p udp -m udp --dport 4673 -j
DNAT --to 192.168.0.62:4673
iptables -t nat -A PREROUTING -i ${PPP[0]} -p tcp -m tcp --dport
5000:5010 -j DNAT --to 192.168.0.16:5000-5010
iptables -t nat -A PREROUTING -i ${PPP[0]} -p tcp -m tcp --dport 15402 -j
DNAT --to 192.168.0.16:15402
iptables -t nat -A PREROUTING -i ${PPP[0]} -p udp -m udp --dport 15402 -j
DNAT --to 192.168.0.16:15402
iptables -t nat -A PREROUTING -i ${PPP[1]} -p tcp -m tcp --dport 15502 -j
DNAT --to 192.168.0.59:15502
iptables -t nat -A PREROUTING -i ${PPP[1]} -p udp -m udp --dport 15502 -j
DNAT --to 192.168.0.59:15502
iptables -t nat -A PREROUTING -i eth2 -p tcp -m tcp -s 192.168.0.16 --dport
80 -j DNAT --to 192.168.0.1:3128
iptables -t nat -A POSTROUTING -o ${PPP[1]} -s 192.168.0.59 -j MASQUERADE
iptables -t nat -A POSTROUTING -o ${PPP[0]} -s 192.168.0.0/26 -j MASQUERADE
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] need help on multiple isp routing
2005-09-29 7:37 [LARTC] need help on multiple isp routing Anonymous
` (5 preceding siblings ...)
2005-10-03 14:37 ` Anonymous
@ 2005-10-03 15:38 ` /dev/rob0
6 siblings, 0 replies; 8+ messages in thread
From: /dev/rob0 @ 2005-10-03 15:38 UTC (permalink / raw)
To: lartc
On Monday 2005-October-03 09:37, Anonymous wrote:
> configure is how to make those 2 links to use their own DNS servers,
Why?
> as ISP's1 servers do not answer queries from ISP's2 ip address and
So? They're answering queries from your ISP1 address, no? Is this a
problem?
> vise versa. i run BIND (as caching and also for my local zone) on my
> router configured to forward requests to ISP's1 DNS servers. i really
> don't want to run 2 copies of BIND with forwarders of ISP2 as the
> only difference in configuration. would anybody come up with a more
> elegant solution on that issue? i'm sure it is not nice to specify
Just don't use forwarders at all. wget the latest root hints file or
just use what you have, for "type hints" for the "." zone.
Forwarding is rarely a good idea. It gains you nothing. You won't
increase the load on the root servers.
> both ISP's servers as forwarders for a single server as the server
> itself uses default gateway of ISP1.
So this is not a problem, but still, forwarders are not helping you.
> and then about services
> installed on a router machine itself - ftp, www. they do not seem to
> listen on ISP's2 ip. any solution besides configuring virtual
> servers?
I prefer Julian's approach to dual gateway routing ... his routes patch
and the nano.txt HOWTO. That provides more of what people tend to want
from multiple ISP connections in a more transparent way. All services
use both links equally (or as weighted.)
I'm sure there are situations in which splitting traffic by service or
destination makes sense ... just not at my 3 dual-ISP sites.
--
mail to this address is discarded unless "/dev/rob0"
or "not-spam" is in Subject: header
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 8+ messages in thread