* [LARTC] route mail through different gateway
@ 2006-08-04 2:36 Michael
2006-08-07 12:01 ` Oscar Mechanic
0 siblings, 1 reply; 2+ messages in thread
From: Michael @ 2006-08-04 2:36 UTC (permalink / raw)
To: lartc
[-- Attachment #1.1: Type: text/plain, Size: 502 bytes --]
Hi All,
I've got server with one LAN card eth0 ip=10.0.0.5
default access t ointernety done through ADSL router gw 10.0.0.1
we got second internet access through another ADSL router gw 10.0.0.2
I want to send all e-mail out through gw 10.0.0.2
How it can be done?
I've tried to mark packets:
iptables -t mangle -A OUTPUT -p tcp --dport 25 -j MARK --set-mark 0x1
and
ip ru add fwmark 0x1 table mail.out
ip ro add default via 10.0.0.2 lookup mail.out
But it is dosen't work
Any help?
--
--
Michael
[-- Attachment #1.2: Type: text/html, Size: 727 bytes --]
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] route mail through different gateway
2006-08-04 2:36 [LARTC] route mail through different gateway Michael
@ 2006-08-07 12:01 ` Oscar Mechanic
0 siblings, 0 replies; 2+ messages in thread
From: Oscar Mechanic @ 2006-08-07 12:01 UTC (permalink / raw)
To: lartc
Silly mistake I always make is too forget to put in NAT on GW.
But what you have done should work. Have you confirmed that this works
on 10.0.0.5
ip route del default
ip route add default via 10.0.0.2
ip route flush cache
If that works maybe try
# Dont know which one of these I think your right it should be output
iptables -t mangle -A PREROUTING -p tcp --dport 25 -j MARK --set-mark
0x1
iptables -t mangle -A OUTPUT -p tcp --dport 25 -j MARK --set-mark 0x1
ip rule add from 10.0.0.0/8 fwmark 1 lookup 200
ip route add default via 10.0.0.2 table 200
# The I would try tcpdump -vv -ni eth? and look at the MACs
# or and check the mark
iptables -I POSTROUTING -p tcp --dport 25 -j LOG
On Fri, 2006-08-04 at 14:36 +1200, Michael wrote:
> Hi All,
>
> I've got server with one LAN card eth0 ip\x10.0.0.5
>
> default access t ointernety done through ADSL router gw 10.0.0.1
> we got second internet access through another ADSL router gw 10.0.0.2
>
> I want to send all e-mail out through gw 10.0.0.2
> How it can be done?
> I've tried to mark packets:
> iptables -t mangle -A OUTPUT -p tcp --dport 25 -j MARK --set-mark 0x1
> and
> ip ru add fwmark 0x1 table mail.out
> ip ro add default via 10.0.0.2 lookup mail.out
>
> But it is dosen't work
> Any help?
>
> --
> --
> Michael
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nlhttp://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] 2+ messages in thread
end of thread, other threads:[~2006-08-07 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-04 2:36 [LARTC] route mail through different gateway Michael
2006-08-07 12:01 ` Oscar Mechanic
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.