Increase speed Internet connection with proxy configuration ubuntu router mikrotik router + client

Well met again in mikrotik + ubuntu proxy method.

Here I will share the results of setting that I do for handling Internet network with the help of a proxy to increase speed, here I take the case in the office where I worked, which is currently 1 Mbps dedicated Internet network with many users (the user / client) in I share this case with two sub-networks share or two departments. ie I to 512 kbps for
networks in offices and 512 kbps for Internet network to the branch office .. to the headquarters of Internet users average more than 20 clients per day and on average the branch offices under 20 and over 10 clients every day ... here I will discuss for the network at the central office first with the picture of the topology as above.

of the topology means is ubuntu and the main router is the secondary router mikrotik, on the ubuntu machine division of its BW with a ratio of 1:2 using the HTB 384kbps/512kbps.

2 ubuntu PCs ethernet
Internet IP eth1: 222.124.xx.xx/29 Gateway: 222.124.xx.xx

eth2 ip: 121.16.0.1/24

Mikrotik Router rb750g
eth1: 121.16.0.3/29 gateway 121.16.0.1
eth2 to the hub continues to client: 10.1.0.1/24
so for the client will use the ip from 10.1.0.2 s / d 10.1.0.254

ubuntu before you are able to share his internet (iptables, and proc/sys/net/ipv4? ip_forward already be setup correctly) or for linux router settings can you learn from the tutorials that exist.
Now once you understand the topology model we proceed setiing ubuntu router on its proxy that you add
http_port 8080 transparent
then you add the following to_localhost acl dst 127.0.0.0 / 8 0.0.0.0/32 is
acl localnet src 121.16.0.0/29
and then you add the above before the http_access deny all that is
http_access allow localnet

Setting the machine mikrotik:
ip proxy settings

 and for the firewall settings as follows:

 ip firewall nat add chain = srcnat action = masquerade src-address = 10.1.0.0/24
ip firewall nat add chain = dstnat action = dst-nat to-addresses = 121.16.0.1 to-ports = 8080
     protocol = tcp dst-address = 10.1.0.1 in-interface = wlan1 dst-port = 80


from the results above setiingan we could try to test the proxy on the ubuntu machine is already in the config squidnya: with the command
sudo tail-f / var / log / squid / access.log
or
sudo tail-f / var / log / squid / cache.log
or
sudo tail-f / var / log / squid / store.log

May be useful ........ good luck

No comments: