Community discussions

MikroTik App
 
youtube345
just joined
Topic Author
Posts: 22
Joined: Sun Jan 19, 2020 12:44 pm

Mange Rule - Chain Prerouting vs Forward

Tue Feb 18, 2020 10:15 am

Let say i have connection game online through port 5000-5500.
When i mark connection this UDP packet . Which chain is better ? (Prerouting vs Forward).


Ex1
/ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=game passthrough=yes port=5000-5500 protocol=udp
add action=mark-packet chain=forward connection-mark=game new-packet-mark=packet_game passthrough=no
Ex2
/ip firewall mangle
add action=mark-connection chain=forward new-connection-mark=game passthrough=yes port=5000-5500 protocol=udp
add action=mark-packet chain=forward connection-mark=game new-packet-mark=packet_game passthrough=no
Ex3
/ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=game passthrough=yes port=5000-5500 protocol=udp
add action=mark-packet chain=prerouting connection-mark=game new-packet-mark=packet_game passthrough=no
Ex4
/ip firewall mangle
add action=mark-connection chain=forward new-connection-mark=game passthrough=yes port=5000-5500 protocol=udp
add action=mark-packet chain=prerouting connection-mark=game new-packet-mark=packet_game passthrough=no
Which example is fastest ? I'm try to learn on wiki with Packet Flow Chains but don't understand much. Sorry for my idiot question .
 
User avatar
skylark
Member Candidate
Member Candidate
Posts: 144
Joined: Wed Feb 10, 2016 3:55 pm

Re: Mange Rule - Chain Prerouting vs Forward

Tue Feb 18, 2020 12:48 pm

It depends on what you want to do further with marked connections? If you want to prioritize traffic take a look here: viewtopic.php?t=149111
 
youtube345
just joined
Topic Author
Posts: 22
Joined: Sun Jan 19, 2020 12:44 pm

Re: Mange Rule - Chain Prerouting vs Forward

Wed Feb 19, 2020 4:55 pm

It depends on what you want to do further with marked connections? If you want to prioritize traffic take a look here: viewtopic.php?t=149111
I will priority 1 all packet game. And surfing web prirority 2 . Download priority 3.
So can you help me which example at #1 is the best for my opinion mark packet game ?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19099
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Mange Rule - Chain Prerouting vs Forward

Wed Feb 19, 2020 5:08 pm

The thread he pointed to has all the information you need. The last entry was clear and simple for example.
 
youtube345
just joined
Topic Author
Posts: 22
Joined: Sun Jan 19, 2020 12:44 pm

Re: Mange Rule - Chain Prerouting vs Forward

Wed Feb 19, 2020 5:18 pm

The thread he pointed to has all the information you need. The last entry was clear and simple for example.
I'm still curious about Chain Prerouting or Forward ?
Because i read so many thread ,
A few people prerouting,prerouting for 2 mangle rule, said it it best for router take all connection than forward.
A few people use forward,forward, said router will forward packet to queue it will slow than prerouting.
A few people use prerouting,forward said prerouting will capture mark connection first after that we don't need prerouting to mark packet, just forward it will go faster to queue.
I don't know which one is best for my game priority. So i must beg some help here to clarify my mind ? Please look at ex1,2,3,4 and help me choose the best for game . Thank you.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19099
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Mange Rule - Chain Prerouting vs Forward

Wed Feb 19, 2020 5:31 pm

My recommendation is to avoid pre-routing until you have a deeper knowledge of MT coding.
Pre-routing can affect traffic you had no intention of messing with due to its non-discriminatory approach.
 
youtube345
just joined
Topic Author
Posts: 22
Joined: Sun Jan 19, 2020 12:44 pm

Re: Mange Rule - Chain Prerouting vs Forward

Sat Feb 22, 2020 11:19 am

Bump
 
ahmedelbarbary
just joined
Posts: 19
Joined: Thu Dec 01, 2016 1:23 am

Re: Mange Rule - Chain Prerouting vs Forward

Tue Jan 05, 2021 3:01 am

i tested many ways to do this but the best
Prorouting for mark connection
forward for packets
 
arm920t
Frequent Visitor
Frequent Visitor
Posts: 61
Joined: Sat Aug 03, 2019 8:02 am

Re: Mange Rule - Chain Prerouting vs Forward

Wed Mar 31, 2021 4:54 am

I tested with forward & forward, and found it is slower than prerouting & prerouting. prerouting will capture dns request to the gateway witch forward won't .
 
fragtion
Member Candidate
Member Candidate
Posts: 257
Joined: Fri Nov 13, 2009 10:08 pm
Location: Johannesburg, South Africa

Re: Mange Rule - Chain Prerouting vs Forward

Wed Nov 24, 2021 6:51 am

prerouting will capture dns request to the gateway witch forward won't .
Thats a good distinction to be aware of. Instead of two connection marking rules rules (one forward one input) for the same packet marking rule, instead you can have just one prerouting connection mark. Correct? Thanks
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19099
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Mange Rule - Chain Prerouting vs Forward

Wed Nov 24, 2021 2:00 pm

Regardless if you need to mangle your gaming ports, then its your gaming skills that is the problem. ;-)

Who is online

Users browsing this forum: Google [Bot], Nospam and 55 guests