Hi, how can i limit the P2P traphic when it is trough port 80 ?
thnks
Dimas
Colombia
Hi, how can i limit the P2P traphic when it is trough port 80 ?
thnks
Dimas
Colombia
The MikroTik P2P traffic filters do not work just based on ports, but do recognize P2P traffic based on the content.
So it will detect P2P traffic going through port 80 (if RouterOS does detect that P2P protocol at all).
There are plenty of examples here in the forum and in the manual how to configure the MikroTik P2P detection.
Best regards,
Christian Meis
I will try again, but when i setting up it, only a few bytes are marked as P2P and a lot as other…
First go to mangle and configure your router as the following:
0 chain=prerouting p2p=all-p2p src-address-list=not_me action=mark-connection new-connection-mark=p2p_conn
passthrough=yes
1 chain=prerouting protocol=tcp dst-port=80 connection-mark=!p2p_conn src-address-list=not_me action=mark-connection
new-connection-mark=http_conn passthrough=yes
2 chain=prerouting protocol=tcp dst-port=21 connection-mark=!p2p_conn,http_conn src-address-list=not_me
action=mark-connection new-connection-mark=ftp_conn passthrough=yes
3 chain=prerouting protocol=tcp dst-port=110 connection-mark=!p2p_conn,http_conn,ftp_conn src-address-list=not_me
action=mark-connection new-connection-mark=pop3_conn passthrough=yes
4 chain=forward connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p_mark passthrough=yes
5 chain=forward protocol=tcp connection-mark=http_conn action=mark-packet new-packet-mark=http_mark passthrough=yes
6 chain=forward protocol=tcp connection-mark=ftp_conn action=mark-packet new-packet-mark=ftp_mark passthrough=yes
7 chain=forward protocol=tcp connection-mark=pop3_conn src-address-list=not_me action=mark-packet
new-packet-mark=pop3_mark passthrough=yes
Then go to queue tree and configure it as the following:
0 name=“2_http_queue” parent=local packet-mark=http_mark limit-at=614400 queue=default priority=2 max-limit=768000
burst-limit=0 burst-threshold=0 burst-time=0s
1 name=“6_ftp_queue” parent=local packet-mark=ftp_mark limit-at=115200 queue=default priority=6 max-limit=768000
burst-limit=0 burst-threshold=0 burst-time=0s
2 name=“1_pop3_queue” parent=local packet-mark=pop3_mark limit-at=38400 queue=default priority=1 max-limit=768000
burst-limit=0 burst-threshold=0 burst-time=0s
3 name=“p2p_down_queue” parent=local packet-mark=p2p_mark limit-at=10000 queue=default priority=8 max-limit=20000
burst-limit=0 burst-threshold=0 burst-time=0s
The basic principle for the above configuration is that we mark all diff types of conn we want and then we mark their packets and lastly we queue them.
pop3 has the highest priority and p2p the lowest one.
while http has higher priority over ftp and at the same time we limited the available bandwith for each type as we want accoding to our bandwidth.
Note:u have to change some settings to use with your connection.