Community discussions

MikroTik App
 
vanessamedina
just joined
Topic Author
Posts: 1
Joined: Sat Feb 29, 2020 5:23 pm

Install a mikrotik web proxy

Sat Feb 29, 2020 5:30 pm

Good, I want you to please tell me the name of a free proxy web, to confirm it in a mikrotik to inform my clients when their service is disconnected due to lack of payment, thanks
 
User avatar
macsrwe
Forum Guru
Forum Guru
Posts: 1007
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: Install a mikrotik web proxy

Thu Mar 05, 2020 7:59 am

Do you have a MikroTik as your gateway router? You can use the (free) proxy facility right in that router to do this. You will, however, need some website where you can store the message to the customer (it can be on your LAN if you have a server running 24/7).

Here is the configuration I used to present "out of service" messages to clients who had not paid their bills, and clients whose service was (mutually agreed) shut off for a season. I would just put their device names or addresses in the firewall address lists "arrears" or "standby" and all their traffic would be routed to an error screen on the server.

/ip firewall filter print
...
105    ;;; Process arrears...
      chain=forward action=jump jump-target=blocktraffic src-address-list=arrears 
106    ;;; ...or standby
      chain=forward action=jump jump-target=blocktraffic src-address-list=standby
...
136    ;;;   Allow any DNS, NTP
      chain=blocktraffic action=return protocol=udp dst-port=53,123 
137    ;;;   ...or (proxy redirected) HTTP
      chain=blocktraffic action=return protocol=tcp dst-port=80,443 
138    ;;;   Don't log on EVERY packet
      chain=blocktraffic action=reject reject-with=icmp-network-unreachable src-address-list=throttle-notice 
139    ;;;   Log arrears...
      chain=blocktraffic action=log src-address-list=arrears log-prefix="ARREARS" 
140    ;;;   ...or standby
      chain=blocktraffic action=log src-address-list=standby log-prefix="STANDBY" 
141    ;;;   No more logs about this user for 10 min
      chain=blocktraffic action=add-src-to-address-list address-list=throttle-notice address-list-timeout=10m 
142    ;;;   Block all other subscriber traffic
      chain=blocktraffic action=reject reject-with=icmp-network-unreachable 

/ip firewall nat print
...
11    ;;; Arrears notice
      chain=dstnat action=redirect to-ports=8081 protocol=tcp src-address-list=arrears dst-port=80,443 

12    ;;; Standby notice
      chain=dstnat action=redirect to-ports=8082 protocol=tcp src-address-list=standby dst-port=80,443 

/ip proxy access export
add dst-address=999.999.999.999 dst-host=somewhere.somewhere.xyz
add action=deny comment="\"Pay bill\" notice" dst-port=80,443 local-port=8081 \
            redirect-to=somewhere.somewhere.xyz/arrears.html
add action=deny comment="Seasonal standby notice" dst-port=80,443 local-port=8082 \
            redirect-to=somewhere.somewhere.xyz/non-ws/standby.html
add action=deny comment="Secure the proxy"

/ip proxy print
                 enabled: yes
             src-address: ::
                    port: 8081,8082
               anonymous: no
            parent-proxy: 0.0.0.0
       parent-proxy-port: 0
     cache-administrator: you@wherever
          max-cache-size: none
   max-cache-object-size: 2048KiB
           cache-on-disk: no
  max-client-connections: 100
  max-server-connections: 100
          max-fresh-time: 1m
   serialize-connections: no
       always-from-cache: no
          cache-hit-dscp: 4
              cache-path: web-proxy1
 
hammondjr1251
just joined
Posts: 1
Joined: Sat Apr 24, 2021 11:52 pm

Re: Install a mikrotik web proxy

Sat Apr 24, 2021 11:54 pm

Thank you for your code

Who is online

Users browsing this forum: No registered users and 12 guests