Page 1 of 1

Limit not working on User Manager on RADIUS

Posted: Wed May 06, 2020 2:44 pm
by basselkattan
Hello
I'm really bored of this problem please someone help me
i have apply hotspot and RADIUS on my router and set new profile include user on RADIUS page (/Userman)
i had set profile to 10 MB limit as Example but i get nothing
when i go to status in user the upload and download not counted correctly , as Example i used 90 MB but on Status page get 300 KB

thank you for all
# may/06/2020 14:28:26 by RouterOS 6.46.6
# software id = 1DIZ-MQD3
#
# model = 951Ui-2HnD
/interface bridge
add admin-mac=74:4D:28:FB:FB:FE auto-mac=no comment=\
    "This bridge is connected to ethernet2,4,5 togother" name=bridge
/interface ethernet
set [ find default-name=ether1 ] comment=\
    "This ethernet 1 is configured as WAN port to internet" name=\
    "ether1 - Wan"
set [ find default-name=ether2 ] name="ether2 - TMG"
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
    country=syria disabled=no distance=indoors frequency=auto installation=\
    indoor mode=ap-bridge ssid=DC-20 wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk group-ciphers=\
    tkip,aes-ccm mode=dynamic-keys supplicant-identity=MikroTik \
    unicast-ciphers=tkip,aes-ccm wpa-pre-shared-key=***** \
    wpa2-pre-shared-key=*******
/ip hotspot profile
set [ find default=yes ] login-by=http-chap use-radius=yes
add dns-name=souccar.net hotspot-address=192.168.16.1 login-by=http-chap \
    name=hsprof1 use-radius=yes
/ip pool
add name=dhcp ranges=192.168.1.20-192.168.1.254
add name=dhcp_pool1 ranges=192.168.2.2-192.168.2.254
add name=hs-pool-4 ranges=192.168.16.2-192.168.16.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=DHCP1
add address-pool=hs-pool-4 disabled=no interface=ether3 lease-time=1h name=\
    dhcp1
/ip hotspot
add address-pool=hs-pool-4 disabled=no interface=ether3 name=hotspot1 \
    profile=hsprof1
/tool user-manager customer
set admin access=\
    own-routers,own-users,own-profiles,own-limits,config-payment-gw
/tool user-manager profile
add name=10MB name-for-users="" override-shared-users=off owner=admin price=0 \
    starts-at=logon validity=0s
/tool user-manager profile limitation
add address-list="" download-limit=0B group-name="" ip-pool="" ip-pool6="" \
    name=10_Lim owner=admin transfer-limit=10485760B upload-limit=0B \
    uptime-limit=0s
/user group
set full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,pas\
    sword,web,sniff,sensitive,api,romon,dude,tikapp"
/interface bridge port
add bridge=bridge interface="ether2 - TMG"
add bridge=bridge interface=ether4
add bridge=bridge interface=ether5
add bridge=bridge interface=wlan1
add bridge=bridge interface=LAN
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface detect-internet
set detect-interface-list=all internet-interface-list=all lan-interface-list=\
    all wan-interface-list=all
/interface list member
add interface=bridge list=LAN
add interface="ether1 - Wan" list=WAN
/ip address
add address=192.168.1.1/24 interface="ether2 - TMG" network=192.168.1.0
add address=99.201.248.2/30 interface="ether1 - Wan" network=99.201.248.0
add address=192.168.16.1/24 interface=ether3 network=192.168.16.0
/ip dhcp-client
add comment=defconf interface="ether1 - Wan"
/ip dhcp-server network
add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24
add address=192.168.16.0/24 comment="hotspot network" gateway=192.168.16.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip dns static
add address=192.168.1.1 comment=defconf name=router.lan
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=src-nat chain=srcnat out-interface="ether1 - Wan" to-addresses=\
    93.150.21.82
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=192.168.16.0/24
/ip hotspot user
add name=admin password=123456
/ip route
add distance=1 gateway=99.201.248.1
/radius
add address=127.0.0.1 secret=123123 service=hotspot
/radius incoming
set accept=yes
/system clock
set time-zone-name=Asia/Damascus
/system identity
set name=FW
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/tool user-manager database
set db-path=user-manager
/tool user-manager profile profile-limitation
add from-time=0s limitation=10_Lim profile=10MB till-time=23h59m59s weekdays=\
    sunday,monday,tuesday,wednesday,thursday
/tool user-manager router
add coa-port=1700 customer=admin disabled=no ip-address=127.0.0.1 log=\
    auth-fail name=router1 shared-secret=123123 use-coa=no
/tool user-manager user
add customer=admin disabled=no ipv6-dns=:: password=123456 shared-users=1 \
    username=bassel wireless-enc-algo=none wireless-enc-key="" wireless-psk=\
    ""