Who doesn’t know Youtube? An online video platform that comes from Google and currently blocks the YouTube site using the proxy youtube regex. Nowadays, Youtube is also very reliable in making money from ads (advertisements). You can subscribe to follow videos that are always updated from one user. However, it could be that Youtube can be a barrier to a job.
How come? While studying online or at work, watching too many YouTube videos can become an addiction. Therefore, it is not surprising that many public facilities, offices, schools, or universities limit their internet use by blocking Youtube sites.
So, when you want to open the Youtube site, you can’t open it, while browsing the internet on other sites still can.
So, how do you block the Youtube site using the layer 7 protocol using Mikrotik?
Check other Access Point products from NetData:
Table of Contents
Before you do this activity, prepare a few things first, because here you will use the Mikrotik Youtube regex technique. The Mikrotik setting technique used is:
- Address List Based on Domain Names
- Using Layer 7 Filtering
- Utilizing Web Proxy
- Using Mikrotik Static DNS The
equipment that you must prepare is:
- LAN cable
- Winbox software
An example for the topology is like this:
Block Youtube Sites Using Layer 7 Mikrotik Youtube Regex
To block Youtube sites by regex Youtube Mikrotik, follow the steps below:
- Open the Winbox application on your PC.
- Setting the IP address of the router that first accessed the PC by selecting IP >> Address. Add the router IP address on each PC according to the topology.
- IP address settings on each PC in the Local Area Connection. Enter the IP address automatically.
- The next step is setting the DHCP Server.
- Set menu IP >> DHCP Server. Later, the DHCP Server window will appear, then click DHCP Setup.
- Then, select which interface will run the DHCP Server. Interface connected to the local network, namely “ether2”. Click Next.
- Next is the DHCP Client setting. This setting is done on a PC.
- Connect the router 4 ethernet cable to the ISP.
- In Winbox, go to IP >> DHCP Client.
- Select the interface as a client, namely “ether 4”. Then click OK.
- Make sure that the DHCP Client setting is in a bound situation as shown below. It can be observed that the IP DHCP Client is obtained automatically from the ISP.
- settings After setting the DHCP Client, then setting the NAT. Select the IP >> Firewall
- menu. On the firewall menu, select the NAT menu. Then click “+”.
- In the general menu, select the outgoing interface “ether 4” as via the internet connected.
- Select the action menu, then select the “masquerade” action.
- Click OK. It can be observed that the NAT setting has been completed, as shown below:
Next Blocking Sites with Mikrotik Youtube regex. In this case, the site to be blocked is the website: www.youtube.com. Following are the steps to block the website using the Mikrotik Youtube regex method:
- Check first by opening www.youtube.com, whether you can or not
- If you still can, next is blocking on the Youtube site. Go to IP> Firewall> Layer 7 Protocols menu. Select the “+” sign, then fill in youtube.com as a blockable site. You can enter Regexp below:
^. + (Youtube). * $ | Oo.preferred.pttelkom- | a.youtube.com | b.youtube.com | c youtube.com | d.youtube.com | e. youtube.com | f.youtube.com | g.youtube.com | h.youtube.com | i.youtube.com | j.youtube.com | l.youtube.com “| (facebook.com). * $
Regex Youtube Mikrotik is scripting used to add content or the site to be blocked.
- Setting the filter rules menu by selecting ip> firewall> filter rules, select the + sign. In the general menu, fill in add chain = forward src-address = 192.168.5.253 (make sure first the source address has been obtained from the client from the ISP. Check the local area connection).
- On the advice menu, fill in the layer 7 protocols that will be blocked.
- On the action menu, choose the “drop” action so that the website to be blocked will be dropped later.
- Once set, click OK. So that the configuration of blocking sites using layer 7 protocols is complete.
- After all these processes have been done, try accessing the Youtube site. If successful, it will not be accessible later like this: