SlideShare a Scribd company logo
www.glcnetworks.com
Layer 7 Firewall
on mikrotik
GLC Webinar,
27 May 2021
Achmad Mardiansyah
achmad@glcnetworks.com
GLC Networks, Indonesia
1
L7 firewall
www.glcnetworks.com
Agenda
● Introduction
● Review prerequisite knowledge
● Firewall
● L7 firewall
● Tips and trick
● Live practice
● Q & A
2
www.glcnetworks.com
introduction
3
www.glcnetworks.com
What is GLC?
● Garda Lintas Cakrawala (www.glcnetworks.com)
● Based in Bandung, Indonesia
● Areas: Training, IT Consulting
● Certified partner for: Mikrotik, Ubiquity, Linux foundation
● Product: GLC radius manager
● Regular event
4
www.glcnetworks.com
Trainer Introduction
● Name: Achmad Mardiansyah
● Base: bandung, Indonesia
● Linux user since 1999, mikrotik user since 2007, UBNT
2011
● Mikrotik Certified Trainer
(MTCNA/RE/WE/UME/INE/TCE/IPv6)
● Mikrotik/Linux Certified Consultant
● Website contributor: achmadjournal.com, mikrotik.tips,
asysadmin.tips
● More info:
http://au.linkedin.com/in/achmadmardiansyah
5
www.glcnetworks.com
Past experience
6
● 2021 (Congo DRC, Malaysia): network support,
radius/billing integration
● 2020 (Congo DRC, Malaysia): IOT integration,
network automation
● 2019, Congo (DRC): build a wireless ISP from
ground-up
● 2018, Malaysia: network revamp, develop billing
solution and integration, setup dynamic routing
● 2017, Libya (north africa): remote wireless migration
for a new Wireless ISP
● 2016, United Kingdom: workshop for wireless ISP,
migrating a bridged to routed network
www.glcnetworks.com
About GLC webinar?
● First webinar: january 1, 2010 (title:
tahun baru bersama solaris - new year
with solaris OS)
● As a sharing event with various topics:
linux, networking, wireless, database,
programming, etc
● Regular schedule
● Irregular schedule: as needed
● Checking schedule:
http://www.glcnetworks.com/schedule
● You are invited to be a presenter
○ No need to be an expert
○ This is a forum for sharing: knowledge,
experiences, information
7
www.glcnetworks.com
Please introduce yourself
● Your name
● Your company/university?
● Your networking experience?
● Your mikrotik experience?
● Your expectation from this course?
8
www.glcnetworks.com
Prerequisite
● This presentation some prerequisite knowledge
● We assume you already know:
○ 7 OSI layer
○ Encapsulation
○ How to use mikrotik device
○ Mikrotik firewall
○ Regular expression
○
9
www.glcnetworks.com
Review prerequisite knowledge
10
www.glcnetworks.com
7 OSI layer & protocol
11
● OSI layer Is a conceptual model from ISO
(International Standard Organization) for project
OSI (Open System Interconnection)
● When you send a message with a courier, you
need to add more info to get your message arrived
at the destination (This process is called
encapsulation)
● What is protocol
○ Is a set of rules for communication
○ Available on each layer
● Communication consist of series encapsulation
○ SDU: service data unit (before PDU)
○ PDU: protocol data unit (after header is added)
www.glcnetworks.com
Layered model (TCP/IP vs ISO) and encapsulation
12
/ datagram
www.glcnetworks.com
Layer 4 header (which one is TCP?)
13
www.glcnetworks.com
Layer 3 header (which one is IPv4?)
14
www.glcnetworks.com
Ethernet header (which is the MTU?)
15
www.glcnetworks.com
802.11 header
16
www.glcnetworks.com
Did you notice?
● There is a big overhead on encapsulation process
● More encapsulation means less payload?
17
www.glcnetworks.com
HUB, switch, router, firewall
18
www.glcnetworks.com
Regular Expression (REGEX), part 1
● Regex = Regular Expression, a feature to search pattern in a data (useful to
apply custom filter)
● Applied on filter (l7 firewall, routing filter)
● Regex code:
○ () → grouping characters together
○ . → match 1 character
○ ?, *, + → shows how the previous character is repeated
■ ? → match 0 or 1 repetition of previous string
■ * → match 0 or many repetition of previous string
■ + → match 1 or many repetition of previous string
○ ^ → matches the beginning of string
○ $ → matches at the end of string
○  → escape character (ffrfom ?*+|^$)
○ [] → match 1 character from the bracket
■ [abc] → match 1 character from the bracket (a or b or c)
■ [a-z] → match 1 character from the bracket (a to z)
●
19
www.glcnetworks.com
Regular Expression (REGEX), part 2
● Regex code:
○ | → similar to or, match left or right part
○ [x09-x0d -~] → match on all printable ASCII characters & space
○ [x09-x0d ] → match a TAB, LF, Vertical Tab, Form Feed, Carriage Return (CR) or space
○ [!-~] → match non-whitespace printable characters
○
20
www.glcnetworks.com
Mikrotik firewall
21
www.glcnetworks.com
On which layer does the (traditional)
Firewall works?
22
● All firewall inspect traffic between segment → layer
3
● Some firewall supports tracking → layer 4
● Some firewall support inside-segment filtering →
layer 2
● See the encapsulation process before
www.glcnetworks.com
What is Mikrotik firewall?
● Is a feature to
○ Control network access (filter)
○ Modify network header (NAT)
○ Marking packet for further processing (mangle)
● Developed from linux
● Consist of 2 parts: matcher & action
● Executed sequentially
● Netadmin must understand the application’s characteristics in order to build a
matcher (e.g. browsing → using TCP/UDP port 80,443)
23
www.glcnetworks.com
How firewall works?
● Setup matcher -> then action
● Mikrotik has lots of options for matcher
-> very flexible
● Matcher + Action = Firewall rule
● Rule is executed sequentially
24
www.glcnetworks.com
25
Where the packet
is processed?
A: see packet flow
Note: ipsec is removed in this
diagram
www.glcnetworks.com
26
26
What's the
difference between
forward and input?
FORWARD
INPUT
www.glcnetworks.com
Layer 7 firewall
27
www.glcnetworks.com
What is Layer-7 Firewall on mikrotik?
● layer7-protocol is a method of searching for patterns in ICMP/TCP/UDP
payload streams
● Is used as matchers
● L7 matcher collects the first 10 packets of a connection or the first 2KB,
stored them in a buffer, and then search for pattern.
● IF pattern not found → pass
● Doesnt guarantee always work → application has its own pattern
28
www.glcnetworks.com
p2p matcher is not available
anymore
● P2p matchers is not available since 6.39
● Previously p2p matchers is based on pattern
matchers
● Because torrent traffic now is encrypted, the
pattern matching is useless
● Mikrotik remove the p2p matchers feature
● Need a different approach to deal with torrent
traffic
29
Not available anymore
www.glcnetworks.com
Example: create l7-pattern
30
www.glcnetworks.com
Example: Create firewall rule
31
www.glcnetworks.com
Not recommended!!
● Its not recommended to put direct action on packet (drop/reject).
32
www.glcnetworks.com
Tips trick
33
www.glcnetworks.com
Tips and trick
● Applied on forward chain → l7 firewall must see both directions (inbound and
outbound)
● Combine it with address-list/connection-mark. After match is done, then put it
on address-list. → to reduce CPU usage
● Put the l7 rules on top → to reduce cpu usage
● Do not check packet that previously marked. Use “connection-mark=no-mark”
or “packet-mark=no-mark” → to reduce CPU
● Do not check packet that previously put on address-list.
● L7 firewall cannot inspect HTTPS payload
● If you want to match based on https header and domain name, use “tls-host”
● Do not use l7 on high traffic
● Be careful when blocking based on IP address, it can host multiple domain.
○ If you block youtube IP address, those IP addresses are used for google drive and other
services
34
www.glcnetworks.com
Tips and trick
● L7 protocol references:
○ http://www.mikrotik.com/download/share/l7_protocols_may_2009.zip
○ https://wiki.mikrotik.com/wiki/Manual:IP/Firewall/L7
○ http://l7-filter.sourceforge.net/
● Some regex references
○ https://regexone.com/
○ http://regexr.com/
○ https://regex101.com/
○ http://buildregex.com/
●
35
www.glcnetworks.com
LIVE practice
36
www.glcnetworks.com
preparation
● SSH client
● SSH parameters
○ SSH address
○ SSH port
○ SSH username
○ SSH password
37
www.glcnetworks.com
Q & A
38
www.glcnetworks.com
Interested? Just come to our training...
● Topics are arranged in systematic and logical way
● You will learn from experienced teacher
● Not only learn the materials, but also sharing experiences, best-practices, and
networking
39
www.glcnetworks.com
End of slides
● Thank you for your attention
● Please submit your feedback: http://bit.ly/glcfeedback
● Find our further event on our website : https://www.glcnetworks.com/en/
● Like our facebook page: https://www.facebook.com/glcnetworks
● Slide: https://www.slideshare.net/glcnetworks/
● Recording (youtube): https://www.youtube.com/c/GLCNetworks
● Stay tune with our schedule
● Any questions?
40

More Related Content

PDF
Network Monitoring with The Dude and Whatsapp
PDF
Mikrotik firewall raw table
PDF
Mikrotik firewall filter
PDF
OpeVPN on Mikrotik
PDF
MikroTik Security
PDF
BGP vs OSPF on Mikrotik
PDF
Mikrotik fastpath
PDF
BGP filter with mikrotik
Network Monitoring with The Dude and Whatsapp
Mikrotik firewall raw table
Mikrotik firewall filter
OpeVPN on Mikrotik
MikroTik Security
BGP vs OSPF on Mikrotik
Mikrotik fastpath
BGP filter with mikrotik

What's hot (20)

PDF
Routing fundamentals with mikrotik
PDF
Mikrotik Bridge Deep Dive
PDF
Using Mikrotik Switch Features to Improve Your Network
PDF
Mikrotik Fastpath vs Fasttrack
PDF
Using mikrotik with radius
PDF
Choosing Mikrotik Platform x86 vs chr
PDF
BGP on mikrotik
PDF
Detecting network virus using mikrotik
PDF
Mikrotik fasttrack
PDF
Policy Based Routing (PBR) on Mikrotik
PDF
OSPF On Router OS7
PDF
MPLS on Router OS V7 - Part 2
PDF
Mikrotik IP Settings For Performance and Security
PDF
Mikrotik Hotspot
PDF
Queue Type on Mikrotik
PDF
MikroTik & RouterOS
PDF
GLC webinar: limiting bandwidth using mikrotik
PDF
Mikro tik advanced training
PDF
Mikrotik firewall mangle
PDF
ISP load balancing with mikrotik nth
Routing fundamentals with mikrotik
Mikrotik Bridge Deep Dive
Using Mikrotik Switch Features to Improve Your Network
Mikrotik Fastpath vs Fasttrack
Using mikrotik with radius
Choosing Mikrotik Platform x86 vs chr
BGP on mikrotik
Detecting network virus using mikrotik
Mikrotik fasttrack
Policy Based Routing (PBR) on Mikrotik
OSPF On Router OS7
MPLS on Router OS V7 - Part 2
Mikrotik IP Settings For Performance and Security
Mikrotik Hotspot
Queue Type on Mikrotik
MikroTik & RouterOS
GLC webinar: limiting bandwidth using mikrotik
Mikro tik advanced training
Mikrotik firewall mangle
ISP load balancing with mikrotik nth
Ad

Similar to Layer 7 Firewall on Mikrotik (20)

PDF
Network LACP/Bonding/Teaming with Mikrotik
PDF
MTCNA Intro to routerOS
PDF
Zabbix for Monitoring
PDF
MTCNA : Intro to RouterOS - Part 1
PDF
BGP Services IP Transit vs IP Peering
PDF
Firewall mangle PBR: steering outbound path similar to inbound
PDF
CCNA : Intro to Cisco IOS - Part 1
PDF
Up and Running SSH Service - Part 1
PDF
Automatic Backup via FTP - Part 1
PDF
Socket Programming with Python
PDF
EOIP Deep Dive
PDF
Using protocol analyzer on mikrotik
PDF
Troubleshooting load balancing
PDF
Best Current Practice (BCP) 38 Ingress Filtering for Security
PDF
Internet Protocol Deep-Dive
PDF
Networking in Telecommunication (signalling, tcp, ucp, ss7, sctp, sigtran)
PDF
Controlling Access Between Devices in the same Layer 2 Segment
PDF
IPv6 with Mikrotik
PDF
Stable OSPF: choosing network type.pdf
PDF
Mikrotik firewall NAT
Network LACP/Bonding/Teaming with Mikrotik
MTCNA Intro to routerOS
Zabbix for Monitoring
MTCNA : Intro to RouterOS - Part 1
BGP Services IP Transit vs IP Peering
Firewall mangle PBR: steering outbound path similar to inbound
CCNA : Intro to Cisco IOS - Part 1
Up and Running SSH Service - Part 1
Automatic Backup via FTP - Part 1
Socket Programming with Python
EOIP Deep Dive
Using protocol analyzer on mikrotik
Troubleshooting load balancing
Best Current Practice (BCP) 38 Ingress Filtering for Security
Internet Protocol Deep-Dive
Networking in Telecommunication (signalling, tcp, ucp, ss7, sctp, sigtran)
Controlling Access Between Devices in the same Layer 2 Segment
IPv6 with Mikrotik
Stable OSPF: choosing network type.pdf
Mikrotik firewall NAT
Ad

More from GLC Networks (20)

PDF
Internal BGP tuning: Mesh peering to avoid loop
PDF
BGP tuning: Peer with loopback
PDF
BGP security tuning: pull-up route
PDF
BGP troubleshooting: route origin
PDF
Steering traffic in OSPF: Interface cost
PDF
Tuning OSPF: Bidirectional Forwarding Detection (BFD)
PDF
Tuning OSPF: Prefix Aggregate
PDF
Tuning OSPF: area hierarchy, LSA, and area type
PDF
GIT as Mikrotik Configuration Management
PDF
RouterOS Migration From v6 to v7
PDF
Building a Web Server with NGINX
PDF
Policy Based Routing with Indirect BGP - Part 2
PDF
Policy Based Routing with Indirect BGP - Part 1
PPTX
Automatic Backup via FTP - Part 2
PDF
Voice Services, From Circuit Switch to VoIP
PDF
MPLS on Router OS V7 - Part 1
PDF
BGP on RouterOS7 - Part 2
PDF
BGP on RouterOS7 -Part 1
PDF
OSPF On Router OS7 - Part 2
PDF
Using Zettabyte Filesystem (ZFS)
Internal BGP tuning: Mesh peering to avoid loop
BGP tuning: Peer with loopback
BGP security tuning: pull-up route
BGP troubleshooting: route origin
Steering traffic in OSPF: Interface cost
Tuning OSPF: Bidirectional Forwarding Detection (BFD)
Tuning OSPF: Prefix Aggregate
Tuning OSPF: area hierarchy, LSA, and area type
GIT as Mikrotik Configuration Management
RouterOS Migration From v6 to v7
Building a Web Server with NGINX
Policy Based Routing with Indirect BGP - Part 2
Policy Based Routing with Indirect BGP - Part 1
Automatic Backup via FTP - Part 2
Voice Services, From Circuit Switch to VoIP
MPLS on Router OS V7 - Part 1
BGP on RouterOS7 - Part 2
BGP on RouterOS7 -Part 1
OSPF On Router OS7 - Part 2
Using Zettabyte Filesystem (ZFS)

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Cloud computing and distributed systems.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation theory and applications.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Cloud computing and distributed systems.
The AUB Centre for AI in Media Proposal.docx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation theory and applications.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Understanding_Digital_Forensics_Presentation.pptx
Unlocking AI with Model Context Protocol (MCP)
MIND Revenue Release Quarter 2 2025 Press Release
Dropbox Q2 2025 Financial Results & Investor Presentation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
Digital-Transformation-Roadmap-for-Companies.pptx
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...

Layer 7 Firewall on Mikrotik

  • 1. www.glcnetworks.com Layer 7 Firewall on mikrotik GLC Webinar, 27 May 2021 Achmad Mardiansyah achmad@glcnetworks.com GLC Networks, Indonesia 1 L7 firewall
  • 2. www.glcnetworks.com Agenda ● Introduction ● Review prerequisite knowledge ● Firewall ● L7 firewall ● Tips and trick ● Live practice ● Q & A 2
  • 4. www.glcnetworks.com What is GLC? ● Garda Lintas Cakrawala (www.glcnetworks.com) ● Based in Bandung, Indonesia ● Areas: Training, IT Consulting ● Certified partner for: Mikrotik, Ubiquity, Linux foundation ● Product: GLC radius manager ● Regular event 4
  • 5. www.glcnetworks.com Trainer Introduction ● Name: Achmad Mardiansyah ● Base: bandung, Indonesia ● Linux user since 1999, mikrotik user since 2007, UBNT 2011 ● Mikrotik Certified Trainer (MTCNA/RE/WE/UME/INE/TCE/IPv6) ● Mikrotik/Linux Certified Consultant ● Website contributor: achmadjournal.com, mikrotik.tips, asysadmin.tips ● More info: http://au.linkedin.com/in/achmadmardiansyah 5
  • 6. www.glcnetworks.com Past experience 6 ● 2021 (Congo DRC, Malaysia): network support, radius/billing integration ● 2020 (Congo DRC, Malaysia): IOT integration, network automation ● 2019, Congo (DRC): build a wireless ISP from ground-up ● 2018, Malaysia: network revamp, develop billing solution and integration, setup dynamic routing ● 2017, Libya (north africa): remote wireless migration for a new Wireless ISP ● 2016, United Kingdom: workshop for wireless ISP, migrating a bridged to routed network
  • 7. www.glcnetworks.com About GLC webinar? ● First webinar: january 1, 2010 (title: tahun baru bersama solaris - new year with solaris OS) ● As a sharing event with various topics: linux, networking, wireless, database, programming, etc ● Regular schedule ● Irregular schedule: as needed ● Checking schedule: http://www.glcnetworks.com/schedule ● You are invited to be a presenter ○ No need to be an expert ○ This is a forum for sharing: knowledge, experiences, information 7
  • 8. www.glcnetworks.com Please introduce yourself ● Your name ● Your company/university? ● Your networking experience? ● Your mikrotik experience? ● Your expectation from this course? 8
  • 9. www.glcnetworks.com Prerequisite ● This presentation some prerequisite knowledge ● We assume you already know: ○ 7 OSI layer ○ Encapsulation ○ How to use mikrotik device ○ Mikrotik firewall ○ Regular expression ○ 9
  • 11. www.glcnetworks.com 7 OSI layer & protocol 11 ● OSI layer Is a conceptual model from ISO (International Standard Organization) for project OSI (Open System Interconnection) ● When you send a message with a courier, you need to add more info to get your message arrived at the destination (This process is called encapsulation) ● What is protocol ○ Is a set of rules for communication ○ Available on each layer ● Communication consist of series encapsulation ○ SDU: service data unit (before PDU) ○ PDU: protocol data unit (after header is added)
  • 12. www.glcnetworks.com Layered model (TCP/IP vs ISO) and encapsulation 12 / datagram
  • 13. www.glcnetworks.com Layer 4 header (which one is TCP?) 13
  • 14. www.glcnetworks.com Layer 3 header (which one is IPv4?) 14
  • 17. www.glcnetworks.com Did you notice? ● There is a big overhead on encapsulation process ● More encapsulation means less payload? 17
  • 19. www.glcnetworks.com Regular Expression (REGEX), part 1 ● Regex = Regular Expression, a feature to search pattern in a data (useful to apply custom filter) ● Applied on filter (l7 firewall, routing filter) ● Regex code: ○ () → grouping characters together ○ . → match 1 character ○ ?, *, + → shows how the previous character is repeated ■ ? → match 0 or 1 repetition of previous string ■ * → match 0 or many repetition of previous string ■ + → match 1 or many repetition of previous string ○ ^ → matches the beginning of string ○ $ → matches at the end of string ○ → escape character (ffrfom ?*+|^$) ○ [] → match 1 character from the bracket ■ [abc] → match 1 character from the bracket (a or b or c) ■ [a-z] → match 1 character from the bracket (a to z) ● 19
  • 20. www.glcnetworks.com Regular Expression (REGEX), part 2 ● Regex code: ○ | → similar to or, match left or right part ○ [x09-x0d -~] → match on all printable ASCII characters & space ○ [x09-x0d ] → match a TAB, LF, Vertical Tab, Form Feed, Carriage Return (CR) or space ○ [!-~] → match non-whitespace printable characters ○ 20
  • 22. www.glcnetworks.com On which layer does the (traditional) Firewall works? 22 ● All firewall inspect traffic between segment → layer 3 ● Some firewall supports tracking → layer 4 ● Some firewall support inside-segment filtering → layer 2 ● See the encapsulation process before
  • 23. www.glcnetworks.com What is Mikrotik firewall? ● Is a feature to ○ Control network access (filter) ○ Modify network header (NAT) ○ Marking packet for further processing (mangle) ● Developed from linux ● Consist of 2 parts: matcher & action ● Executed sequentially ● Netadmin must understand the application’s characteristics in order to build a matcher (e.g. browsing → using TCP/UDP port 80,443) 23
  • 24. www.glcnetworks.com How firewall works? ● Setup matcher -> then action ● Mikrotik has lots of options for matcher -> very flexible ● Matcher + Action = Firewall rule ● Rule is executed sequentially 24
  • 25. www.glcnetworks.com 25 Where the packet is processed? A: see packet flow Note: ipsec is removed in this diagram
  • 28. www.glcnetworks.com What is Layer-7 Firewall on mikrotik? ● layer7-protocol is a method of searching for patterns in ICMP/TCP/UDP payload streams ● Is used as matchers ● L7 matcher collects the first 10 packets of a connection or the first 2KB, stored them in a buffer, and then search for pattern. ● IF pattern not found → pass ● Doesnt guarantee always work → application has its own pattern 28
  • 29. www.glcnetworks.com p2p matcher is not available anymore ● P2p matchers is not available since 6.39 ● Previously p2p matchers is based on pattern matchers ● Because torrent traffic now is encrypted, the pattern matching is useless ● Mikrotik remove the p2p matchers feature ● Need a different approach to deal with torrent traffic 29 Not available anymore
  • 32. www.glcnetworks.com Not recommended!! ● Its not recommended to put direct action on packet (drop/reject). 32
  • 34. www.glcnetworks.com Tips and trick ● Applied on forward chain → l7 firewall must see both directions (inbound and outbound) ● Combine it with address-list/connection-mark. After match is done, then put it on address-list. → to reduce CPU usage ● Put the l7 rules on top → to reduce cpu usage ● Do not check packet that previously marked. Use “connection-mark=no-mark” or “packet-mark=no-mark” → to reduce CPU ● Do not check packet that previously put on address-list. ● L7 firewall cannot inspect HTTPS payload ● If you want to match based on https header and domain name, use “tls-host” ● Do not use l7 on high traffic ● Be careful when blocking based on IP address, it can host multiple domain. ○ If you block youtube IP address, those IP addresses are used for google drive and other services 34
  • 35. www.glcnetworks.com Tips and trick ● L7 protocol references: ○ http://www.mikrotik.com/download/share/l7_protocols_may_2009.zip ○ https://wiki.mikrotik.com/wiki/Manual:IP/Firewall/L7 ○ http://l7-filter.sourceforge.net/ ● Some regex references ○ https://regexone.com/ ○ http://regexr.com/ ○ https://regex101.com/ ○ http://buildregex.com/ ● 35
  • 37. www.glcnetworks.com preparation ● SSH client ● SSH parameters ○ SSH address ○ SSH port ○ SSH username ○ SSH password 37
  • 39. www.glcnetworks.com Interested? Just come to our training... ● Topics are arranged in systematic and logical way ● You will learn from experienced teacher ● Not only learn the materials, but also sharing experiences, best-practices, and networking 39
  • 40. www.glcnetworks.com End of slides ● Thank you for your attention ● Please submit your feedback: http://bit.ly/glcfeedback ● Find our further event on our website : https://www.glcnetworks.com/en/ ● Like our facebook page: https://www.facebook.com/glcnetworks ● Slide: https://www.slideshare.net/glcnetworks/ ● Recording (youtube): https://www.youtube.com/c/GLCNetworks ● Stay tune with our schedule ● Any questions? 40