Community discussions

MikroTik App
 
sioux
newbie
Topic Author
Posts: 47
Joined: Thu May 25, 2006 10:35 pm
Location: Poland/Tarnów

dnat and nth, random .. what ever

Fri Jul 06, 2007 10:36 am

hi all

how to dnat every nth (or random) connection to remote http server TO to my http server?
to do it I need to catch syn (another words state NEW) packet but in NAT section there is not such an option.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6697
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: dnat and nth, random .. what ever

Fri Jul 06, 2007 5:03 pm

I'm not sure it is possible with destination NAT, (I mean redirection to specific web-server), it is possible either with
- static DNS entries;
- proxy access rules.
 
User avatar
airstream
Member Candidate
Member Candidate
Posts: 188
Joined: Fri Feb 03, 2006 6:33 am
Location: New Zealand

Re: dnat and nth, random .. what ever

Sun Jul 08, 2007 1:36 am

create a packet mark for every nth packet you want with mangle, then use packet mark in your dstnat (you may need the NOT statement here depending on your existing nats)
 
sioux
newbie
Topic Author
Posts: 47
Joined: Thu May 25, 2006 10:35 pm
Location: Poland/Tarnów

Re: dnat and nth, random .. what ever

Mon Jul 09, 2007 10:10 am

and that is correct becouse mangle is traveled first :D

THX