Tuesday, August 13, 2019

How to Config 2 WAN / 2 MODEM Load Balancing with Hotspot ( PCC Method )

2 Wan Load Balancing with Hotspot




/interface set ether1 name=WAN1
/interface set ether2 name=WAN2
/interface set ether3 name=Local

/ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
add address=192.168.1.10/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
add address=192.168.2.10/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2

/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=192.168.0.1,8.8.8.8,8.8.4.4
 Config 2 Wan Load Balancing with Hotspot

/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn

/ip firewall mangle
add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2

/ip firewall mangle
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=Local

/ip firewall mangle
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes

/ip firewall mangle
add chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN2

/ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_WAN2 check-gateway=ping

/ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping

/ip firewall nat
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade

/ip address
add address=192.168.0.1/24 disabled=no interface=Local network=192.168.0.0

/ip pool
add name=hs-pool-1 ranges=192.168.0.10-192.168.0.254

/ip dhcp-server
add address-pool=hs-pool-1 authoritative=after-2sec-delay bootp-support=static disabled=no interface=Local lease-time=1h name=dhcp1

/ip dhcp-server config
set store-leases-disk=5m

/ip dhcp-server network
add address=192.168.0.0/24 comment=”hotspot network” gateway=192.168.0.1

/ip hotspot profile
set default dns-name=”" hotspot-address=0.0.0.0 html-directory=hotspot http-cookie-lifetime=3d http-proxy=0.0.0.0:0 login-by=http-chap name=default rate-limit=”" smtp-server=0.0.0.0 split-user-domain=no use-radius=no
add dns-name=includealine.com hotspot-address=192.168.0.1 html-directory=hotspot http-cookie-lifetime=1d http-proxy=0.0.0.0:0 login-by=http-chap name=hsprof1 rate-limit=”" smtp-server=0.0.0.0 split-user-domain=no use-radius=no

/ip hotspot
add address-pool=hs-pool-1 addresses-per-mac=1 disabled=no idle-timeout=15m interface=ether2 keepalive-timeout=none name=hotspot1 profile=hsprof1

/ip hotspot user profile
set default idle-timeout=15m keepalive-timeout=2m name=default shared-users=1 status-autorefresh=1m transparent-proxy=no
add address-pool=hs-pool-1 advertise=no idle-timeout=none keepalive-timeout=2m name=”512k Limit” open-status-page=always rate-limit=512k/512k shared-users=1 status-autorefresh=1m transparent-proxy=yes
add address-pool=hs-pool-1 advertise=no idle-timeout=none keepalive-timeout=2m name=”256k Limit” open-status-page=always rate-limit=256k/256k shared-users=1 status-autorefresh=1m transparent-proxy=yes

/ip hotspot service-port
set ftp disabled=yes ports=21

/ip hotspot walled-garden ip
add action=accept disabled=no dst-address=192.168.0.1

/ip hotspot
set numbers=hotspot1 address-pool=none

/ip firewall nat
add action=masquerade chain=srcnat disabled=no

/ip hotspot user
add disabled=no name=admin password=123 profile=default
add disabled=no name=test1 password=1234 profile=”512k Limit” server=hotspot1
add disabled=no name=test2 password=1234 profile=”256k Limit” server=hotspot1

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna Veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

0 comments:

Post a Comment

Start Work With Me

Contact Us
JOHN DOE
+123-456-789
Melbourne, Australia