jager
November 3, 2005, 9:46pm
1
Hi,
I would like to redirect all p2p traffic to another IP.
I marked it in mangle with the following:
0 chain=prerouting p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn passthrough=yes
1 chain=prerouting connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p passthrough=yes
This marking is OK, and there is traffic shown OK on it.
After that, I created a rule as follows:
0 chain=srcnat packet-mark=p2p connection-mark=p2p_conn action=src-nat to-addresses=x.x.x.x to-ports=0-65535
But, unfortunately, this is not working. No traffic is being redirected. Can anybody help me, what am I doing wrong??
Thank you in advance for help
xrtc
November 21, 2005, 11:11am
2
did u find any way to do this??
i want to do the same thing
jager
November 21, 2005, 4:08pm
3
No, still no idea how to do it
Don’t you want a destination nat instead of a source nat?
jager
November 22, 2005, 9:11am
5
well, destination does not matter in this case, right? My logic goes that it should be snat, but maybe I`m wrong.
Please, give some example how do you think we should do it. Thank you
Eugene
November 22, 2005, 2:25pm
6
You want to route all p2p traffic through another ISP, right? Then the second rule should contain new-routing-mark parameter instead of new-packet-mark.
Passthrough should be set to no for the second rule as well. Finally, add a separate route for all packets mangled with particular routing mark in /ip route section.
Eugene
I think maybe I misunderstood what you were trying to do.
jager
November 22, 2005, 9:05pm
8
YES! Thats correct!
Will try your tip the first thing in the morning! Thanx a million, I hope it will work. In any case, I will leave a feedback here.
smilga
November 23, 2005, 7:28am
9
You can not mark first packet for P2P traffic that why you can not route it to different ISP.
I suggest you to route all P2P traffic to default gateway and everything else to different.
jager
November 23, 2005, 7:31am
10
But why not? Is the impossibility of marking the first packet a problem in mikrotik itself or some generaly networking issue?
smilga
November 23, 2005, 8:27am
11
It is impossibility to detect from first packet if it P2P or not so it is generaly.