Implementing Content Filtering With MikroTik Router Proxy Server Step-by-Step Instructions
Looking for a way to create an external proxy on your Mikrotik router using RouterOS Mikrotik? You're in the right place. We'll take you through the steps to achieve this in this post.
First and foremost, it must be understood that one of the most important features of Mikrotik RouterOS is its ability to act as a network router. Consequently, one of the reasons why this platform is popular with network engineers and administrators is its functionality as a well-equipped routing solution.
- First, log into your Mikrotik RouterOS platform using the terminal.
- Click on the "IP" in the primary menu.
- Next, click on "Web Proxy."
- Once you're on the Web Proxy page, click the "General" tab.
- Check the "Enabled," "Transparent Proxy," and "Cache On Disk" checkboxes.
- Now, click on the "Access" tab.
- Here, input your HTTP and HTTPS proxy port in the appropriate fields.
- In the same tab, input your proxy source address and skip destination address fields.
- Since we want the proxy to be accessible from any internal network, type "0.0.0.0/0" in the proxy source address field.
- Click on the "Cache" tab.
- In this tab, input a cache size value. 1000MB is a great value to start with.
- Next, click on the "Log" tab.
- Input "/web-proxy/log" in the "Prefix" field.
- In the "Action" field, choose "Ignores."
- Finally, click on the "Apply" button found at the end left corner of the page.
Congratulations, you have now successfully configured the Web Proxy on Mikrotik RouterOS!
Now comes the fun part. We'll show you how to set up an external proxy. Follow these steps:
- Log in to your SSH-server.
- Create a new user if it doesn't exist already.
adduser proxyuser
- Create a new password for the newly created user.
passwd proxyuser
- Add proxyuser to the sudo group.
adduser proxyuser sudo
- Edit the sudo configuration file.
visudo
- Scroll to the bottom of the file and type the following:
proxyuser ALL=NOPASSWD: /usr/bin/apt-get
- Save and quit the file.
ctrl+x
- Now, log out from the SSH-server and log in as the proxyuser.
- Install the Squid proxy package using the following command:
sudo apt-get install squid3
- Edit the Squid configuration file.
sudo nano /etc/squid3/squid.conf
- Scroll down the file to the http port configuration line and change it to the following:
http_port 3128 transparent
- Find the following two lines:
#acl allowed_ips src 192.168.0.0/16
#http_access allow allowed_ips
- Uncomment both lines by removing the "#" in front of them.
- Save and quit the file.
ctrl+x
- Finally, restart Squid.
sudo service squid3 restart
Done! You've successfully created a proxy server using the Squid package on your SSH-server. Next, we'll set up the external proxy on your Web Proxy page in Mikrotik RouterOS. Follow these steps:
- Go to the "Access" tab in the Web Proxy page on Mikrotik RouterOS.
- Input the IP address, proxy port, and the newly-created username and password in the appopriate fields.
- Click on the "Apply" button to save the configuration.
By following these steps, you now have external access to the Mikrotik RouterOS Web Proxy via Squid Proxy.
Conclusion:
In this post, we've shown you how to create an external proxy on your Mikrotik router using RouterOS Mikrotik. We broke down the steps for you and explained the importance of Mikrotik RouterOS as a routing solution. Setting up an external proxy allows for added control and security, and can be beneficial for network engineers and administrators. Try it out and let us know how it works for you!
Post a Comment for "Implementing Content Filtering With MikroTik Router Proxy Server Step-by-Step Instructions"