Community discussions

MUM Europe 2020
 
User avatar
Equis
Forum Veteran
Forum Veteran
Topic Author
Posts: 888
Joined: Mon Jun 06, 2005 6:48 am

Mark route and srcnat

Wed Mar 14, 2007 5:33 am

Hello

I would like to redirect some traffic to another gateway

This works fine if I mark route & setup default gateway with that mark.

Only I need to srcnat now (gateway does not nat)

How do I scrnat and redirect to another gateway.

EG
203.1.1.1 is public IP on router for ISP 1
203.2.2.2 is public IP on same router ISP2

I need to redirect some to isp2 and srcnat to 203.2.2.2

Is this possible?

Thanks
 
changeip
Forum Guru
Forum Guru
Posts: 3804
Joined: Fri May 28, 2004 5:22 pm

Wed Mar 14, 2007 6:58 am

is each ISP on its own interface? just use src-nat / masq based on which interface it's leaving.

Sam
 
User avatar
Equis
Forum Veteran
Forum Veteran
Topic Author
Posts: 888
Joined: Mon Jun 06, 2005 6:48 am

Wed Mar 14, 2007 7:06 am

Hello,

No, they share an interface.

I can src Nat but it will alwasy go out the default gateway.
I was wondering if I can srcnat & mark route at the same time

Thanks
 
changeip
Forum Guru
Forum Guru
Posts: 3804
Joined: Fri May 28, 2004 5:22 pm

Wed Mar 14, 2007 5:18 pm

That's why I asked if you had 2 interfaces. If you mark the route and it's going out interface1, it will srn-nat with interface1's range. If your mark the route and it's leaving interface2, it will src-nat with interface2's range. On a shared interface you don't have as much flexibility because now you've eliminated the interface decision.

Maybe you marked the connection at the same time you route marked right ? You should be able to use that connection mark in the nat chain as well.
 
User avatar
Equis
Forum Veteran
Forum Veteran
Topic Author
Posts: 888
Joined: Mon Jun 06, 2005 6:48 am

Wed Mar 14, 2007 11:55 pm

Hello,

It is working

Routes: add route for packets marked "test" to gw2
Mangle: connection/packect and mark routing "test" (for me this was WOW games & Voip)

Nat: Srcnat to second IP all data marked with routing mark "test"

Works very well :-) :-)

Who is online

Users browsing this forum: ab130kd, HarolsdPhivy, valnuke and 105 guests