Forum Thread: Mikrotik 2 WAN(ISP) + 2 LAN, with PCC + Hotspot

Hello guys,
anyone could help me?

Client of eth4 (dhcp 190.79.8.---)> nslookup travosh.com success
Client of eth5 (why got 190.79.8.--- not 190.79.7.---)> nslookup travosh.com, server: unknown address:190.79.8.1
IP Pool : 190.79.7.10-190.179.8.200
all the network is /24, if eth4 & 5 /16 , it doesn't work at all...

any solution?

here is my configuration

/interface set ether2 name=WAN1
/interface set ether3 name=WAN2
/interface set ether4 name=HOTSPOT1
/interface set ether4 name=HOTSPOT2
/ip address
add address=190.79.8.1/24 network=190.79.8.0 broadcast=190.79.8.255 interface=HOTSPOT1
add address=190.79.7.1/24 network=190.79.7.0 broadcast=190.79.7.255 interface=HOTSPOT2
add address=200.4.2.11/24 network=200.4.2.0 broadcast=200.4.2.255 interface=WAN1
add address=192.168.169.2/24 network=192.168.169.0 broadcast=192.168.169.255 interface=WAN2

/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=190.79.8.1,8.8.8.8,8.8.4.4

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

/ip firewall mangle
add chain=output connection-mark=WAN1conn action=mark-routing new-routing-mark=toWAN1
add chain=output connection-mark=WAN2conn action=mark-routing new-routing-mark=toWAN2
/ip firewall mangle
add chain=prerouting dst-address=200.4.2.0/24 action=accept in-interface=HOTSPOT1
add chain=prerouting dst-address=192.168.169.0/24 action=accept in-interface=HOTSPOT1
add chain=prerouting dst-address=200.4.2.0/24 action=accept in-interface=HOTSPOT2
add chain=prerouting dst-address=192.168.169.0/24 action=accept in-interface=HOTSPOT2
/ip firewall mangle

add chain=prerouting dst-address-type=!local hotspot=auth in-interface=HOTSPOT1 per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1conn passthrough=yes

add chain=prerouting dst-address-type=!local hotspot=auth in-interface=HOTSPOT1 per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2conn passthrough=yes

add chain=prerouting dst-address-type=!local hotspot=auth in-interface=HOTSPOT2 per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1conn passthrough=yes

add chain=prerouting dst-address-type=!local hotspot=auth in-interface=HOTSPOT2 per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2conn passthrough=yes

/ip firewall mangle
add chain=prerouting connection-mark=WAN1conn in-interface=HOTSPOT1 action=mark-routing new-routing-mark=toWAN1
add chain=prerouting connection-mark=WAN2conn in-interface=HOTSPOT1 action=mark-routing new-routing-mark=toWAN2
add chain=prerouting connection-mark=WAN1conn in-interface=HOTSPOT2 action=mark-routing new-routing-mark=toWAN1
add chain=prerouting connection-mark=WAN2conn in-interface=HOTSPOT2 action=mark-routing new-routing-mark=toWAN2
/ip route
add dst-address=0.0.0.0/0 gateway=200.4.2.11 routing-mark=toWAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.169.2 routing-mark=to
WAN2 check-gateway=ping
/ip route
add dst-address=0.0.0.0/0 gateway=200.4.2.11 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.169.2 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=190.79.8.1/24 disabled=no interface=HOTSPOT1 network=190.79.8.0
add address=190.79.7.1/24 disabled=no interface=HOTSPOT2 network=190.79.7.0

/ip pool
add name=hs-pool-1 ranges=190.79.7.10-190.79.8.200
/ip dhcp-server

add address-pool=hs-pool-1 authoritative=after-2sec-delay bootp-support=static disabled=no interface=HOTSPOT1 lease-time=1h name=dhcp1

add address-pool=hs-pool-2 authoritative=after-2sec-delay bootp-support=static disabled=no interface=HOTSPOT2 lease-time=1h name=dhcp2

/ip dhcp-server config set store-leases-disk=5m
/ip dhcp-server network
add address=190.79.8.0/24 comment="hotspot network" gateway=190.79.8.1
add address=190.79.7.0/24 comment="hotspot network" gateway=190.79.7.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=travosh.com hotspot-address=190.79.8.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=HOTSPOT1 keepalive-timeout=none name=HOTSPOT 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=190.79.8.1
/ip hotspot set numbers=HOTSPOT address-pool=none
/ip firewall nat add action=masquerade chain=srcnat disabled=no
/ip hotspot user
add disabled=no name=admin password=777777 profile=default
add disabled=no name=test-512k password=1234 profile="512k Limit" server=HOTSPOT
add disabled=no name=test-256k password=1234 profile="256k Limit" server=HOTSPOT

Be the First to Respond

Share Your Thoughts

  • Hot
  • Active