Sunday, August 20, 2017

Payment Reminder For PPPoE

19 comments

/ip pool
add name=block ranges=172.16.202.1-172.16.202.254
/ppp profile
add change-tcp-mss=no local-address=10.10.0.1 name=Block rate-limit=100K/100K remote-address=block
/ip firewall nat
add action=redirect chain=dstnat comment="Payment redirect" dst-port=80 protocol=tcp src-address=\
    172.16.202.0/24 to-ports=8080
/ip firewall filter
add action=accept chain=forward comment=Reminder dst-port=53 protocol=tcp src-address=172.16.202.0/24
add action=accept chain=forward dst-port=53 protocol=udp src-address=172.16.202.0/24
add action=drop chain=forward src-address=172.16.202.0/24
/ip proxy
set cache-administrator=AfriCloud enabled=yes max-cache-size=none src-address=0.0.0.0
/ip proxy access
add dst-host=www.paymentreminder.weebly.com
add action=deny redirect-to=www.paymentreminder.weebly.com

Saturday, July 9, 2016

Non Payment Reminder For PPPoE Users

8 comments

























/ip proxy
set enabled=yes max-cache-size=none parent-proxy=0.0.0.0 src-address=0.0.0.0
/ip proxy access
add action=deny dst-host=!itlearnweb.comli.com redirect-to=\
    itlearnweb.comli.com/
/ip pool
add name=block ranges=172.16.100.1-172.16.100.254
/ip firewall filter
add action=drop chain=forward comment="Block Access For ''Non Payment Users''" \
    dst-port=!80 log-prefix="" protocol=tcp src-address=\
    172.16.100.1-172.16.100.254
/ppp profile
add dns-server=8.8.8.8,8.8.4.4 local-address=10.10.0.1 name="Non Payment" \
    rate-limit=256K/256K remote-address=block


Tuesday, May 31, 2016

2 WANS ''WAN-1 FOR PPPoE USERS''---''WAN-2 FOR HOTPSOT USERS''

4 comments



/interface ethernet
set [ find default-name=ether1 ] name=ether1-Wan1
set [ find default-name=ether2 ] name=ether2-Wan2
set [ find default-name=ether3 ] name=ether3-PPPoE
set [ find default-name=ether4 ] name=ether4-Hotspot
set [ find default-name=ether5 ] name=ether5
/ip address
add address=192.168.10.2/24 interface=ether1-Wan1 network=192.168.10.0
add address=192.168.11.2/24 interface=ether2-Wan2 network=192.168.11.0
add address=10.10.0.1/24 interface=ether3-PPPoE network=10.10.0.0
add address=192.168.50.1/24 interface=ether4-Hotspot network=192.168.50.0
/ip route
add distance=1 gateway=192.168.10.1
add distance=1 gateway=192.168.11.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat comment="WAN1 MASQUERADE" out-interface=ether1-Wan1
add action=masquerade chain=srcnat comment="WAN2 MASQUERADE" out-interface=ether2-Wan2
add action=masquerade chain=srcnat disabled=no src-address=\
    172.16.1.2-172.16.1.254
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=192.168.50.0/24
/ip firewall mangle
add action=mark-routing chain=prerouting comment="PPPoE GO THAROUGH WAN1" new-routing-mark=pppoe-wan1 src-address=172.16.1.2-172.16.1.254
add action=mark-routing chain=prerouting comment="HOTSPOT GO THAROUGH WAN2" new-routing-mark=hotspot-wan2 src-address=192.168.50.0/24
/ip route
add distance=1 gateway=192.168.10.1 routing-mark=pppoe-wan1
add distance=1 gateway=192.168.11.1 routing-mark=hotspot-wan2
/system note set note="Server Configuration By <HAMZA KHALIL> (www.itlearnweb.com)" show-at-login=yes
/ip pool
add name=ppp ranges=172.16.1.2-172.16.1.254
add name=hs-pool-4 ranges=192.168.50.2-192.168.50.254
: log warning "PPPoE setup is started by Hamza Khalil"
/interface pppoe-server server
add authentication=pap,chap default-profile=default disabled=no interface=\
    ether3-PPPoE keepalive-timeout=10 max-mru=1480 max-mtu=1480 max-sessions=0 mrru=\
    disabled one-session-per-host=yes service-name=service1
/ppp profile
set 0 change-tcp-mss=yes dns-server=10.10.0.1,192.168.10.1 local-address=\
    10.10.0.1 name=default only-one=default remote-address=ppp use-compression=\
    default
add change-tcp-mss=default dns-server=10.10.0.1,192.168.10.1 local-address=\
    10.10.0.1 name=2MB only-one=yes rate-limit=500K/2M remote-address=ppp \
    use-compression=default
add change-tcp-mss=default dns-server=10.10.0.1,192.168.10.1 local-address=\
    10.10.0.1 name="my profile" only-one=default remote-address=ppp \
    use-compression=default
: log warning "PPPoE setup is completed by Hamza Khalil"
: log warning "Hotspot setup is starting by Hamza Khalil"
/ip hotspot profile
add dns-name=login.net hotspot-address=192.168.50.1 login-by=\
    http-chap,https,http-pap name=hsprof1
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \

    mac-cookie-timeout=3d
/ip dhcp-server
add address-pool=hs-pool-4 disabled=no interface=ether4 lease-time=1h name=\
    dhcp1
/ip hotspot
add address-pool=hs-pool-4 disabled=no interface=ether4 name=hotspot1 profile=\
    hsprof1
/ip dhcp-server network
add address=192.168.50.0/24 comment="hotspot network" gateway=192.168.50.1
: log warning "full setup is completed by Hamza Khalil"

DOWNLOAD BACKUP FILE AND SCRIPT

Sunday, May 8, 2016

Multiple Servers (DHCP, Hotspot & PPPoE) in one RB

1 comments
/interface ethernet
set [ find default-name=ether1 ] comment="Wan Network"
set [ find default-name=ether2 ] comment="Dhcp Server"
set [ find default-name=ether3 ] comment="Hotspot Server"
set [ find default-name=ether4 ] comment="PPPoE Server"
/ip address
add address=192.168.1.10/24 comment="Wan Network" interface=ether1 network=\
    192.168.1.0
add address=10.10.0.1/24 comment="PPP Network" interface=ether4 network=\
    10.10.0.0
add address=192.168.2.1/24 comment="DHCP Network" interface=ether2 network=\
    192.168.2.0
add address=192.168.3.1/24 comment="Hotspot Network" interface=ether3 \
    network=192.168.3.0
/ip dns
set allow-remote-requests=yes cache-size=10000KiB servers=8.8.8.8,8.8.4.4
/ip route
add distance=1 gateway=192.168.1.1
/ip pool
add name=hs-pool-3 ranges=192.168.3.2-192.168.3.254
add name=dhcp_pool1 ranges=192.168.2.2-192.168.2.254
add name=ppp ranges=172.16.2.254-172.168.1.2
/ip dhcp-server
add address-pool=hs-pool-3 disabled=no interface=ether3 lease-time=1h name=\
    dhcp1
add address-pool=dhcp_pool1 disabled=no interface=ether2 name=dhcp2
/ip dhcp-server network
add address=192.168.2.0/24 gateway=192.168.2.1
add address=192.168.3.0/24 comment="hotspot network" gateway=192.168.3.1
/ip hotspot
add address-pool=hs-pool-3 disabled=no interface=ether3 name=hotspot1 \
    profile=hsprof1
/ip hotspot profile
add dns-name=login.net hotspot-address=192.168.3.1 login-by=\
    http-chap,https,http-pap name=hsprof1
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
    mac-cookie-timeout=3d
add idle-timeout=none keepalive-timeout=2m mac-cookie-timeout=3d name=1Mb \
    rate-limit=300K/1M transparent-proxy=yes
add idle-timeout=none keepalive-timeout=2m mac-cookie-timeout=3d name=2Mb \
    rate-limit=300K/2M transparent-proxy=yes
add idle-timeout=none keepalive-timeout=2m mac-cookie-timeout=3d name=4Mb \
    rate-limit=1M/4M transparent-proxy=yes
/ip hotspot user
add name=admin password=admin
/interface pppoe-server server
add authentication=pap,chap disabled=no interface=ether4 \
    one-session-per-host=yes service-name=service1
/ppp profile
add local-address=10.10.0.1 name=1Mb only-one=yes rate-limit=300K/1M \
    remote-address=ppp
add local-address=10.10.0.1 name=2Mb only-one=yes rate-limit=300K/2M \
    remote-address=ppp
add local-address=10.10.0.1 name=4Mb only-one=yes rate-limit=1M/4M \
    remote-address=ppp
/ppp secret
add name=test password=test profile=4Mb service=p
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat comment="masqu
    src-address=192.168.3.0/24
add action=masquerade chain=srcnat comment="masqu
    src-address=192.168.2.2-192.168.2.254
add action=masquerade chain=srcnat comment="masqu
    src-address=172.16.1.2-172.16.2.254

DONLOAD%20SCRIPTS%20%20%26%20BACKUP%20FILE

Tuesday, March 8, 2016

HOW TO MAKE A BACKUP FILE

0 comments

Full Hotspot Setup Backup file

/ip hotspot export file=hotspot_backup 

Hotspot Users Backup file

/ip hotspot user export file=Hotspot_Users


PPPoE Backup file

/ppp export file=pppoe_backup
RESTORE

/import hotspot_backup

Sunday, February 28, 2016

Limit Different Bandwidth In Day and Night For PPPoE Users

6 comments
Limit Different Bandwidth In Day and Night For PPPoE Users


There are lot many ways to limit bandwidth for day and Night.
If we need to configure bandwidth for DAY time users and NIGHT time users. Hope this article will be helpful for us.



Download%20Full%20Script

Monday, August 24, 2015

Dual WAN Load Balancing pppoe-clients PCC

7 comments
Result


########PPPoE-CLIENTS##########
/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap default-route-distance=1 dial-on-demand=no \
    disabled=no interface=ether1 keepalive-timeout=60 max-mru=1480 max-mtu=1480 mrru=1600 name=\
    pppoe-out1 password=XXXX profile=default service-name="" use-peer-dns=yes user=\
    XXXXXX
add ac-name="" add-default-route=yes allow=pap,chap default-route-distance=1 dial-on-demand=no \
    disabled=no interface=ether2 keepalive-timeout=60 max-mru=1480 max-mtu=1480 mrru=1600 name=\
    pppoe-out2 password=XXXXXXXXXX profile=default service-name="" use-peer-dns=yes user=\
    XXXXXXXXX


########FIREWALL MANGLE########
/ip firewall mangle
add chain=prerouting in-interface=pppoe-out1
add chain=prerouting in-interface=pppoe-out2
add action=mark-connection chain=prerouting dst-address-type=!local \
    new-connection-mark=wan1_conn per-connection-classifier=\
    both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local \
    new-connection-mark=wan2_conn per-connection-classifier=\
    both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=wan1_conn \
    new-routing-mark=to_wan1
add action=mark-routing chain=prerouting connection-mark=wan2_conn \
    new-routing-mark=to_wan2

########FIREWALL NAT#########
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1
add action=masquerade chain=srcnat out-interface=pppoe-out2

########IP ROUTE############
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 scope=30 target-scope=10

Sunday, June 28, 2015