Network & Broadband Solutions / MikroTik & Network Administration

MikroTik PPPoE Server Auto Script (Ready to Use)

Started Oct 11, 2026 · 145 views

Description:
Para sa mga naghahanap ng mabilis at madaling paraan para ma-setup ang PPPoE Server sa kanilang MikroTik router, narito ang isang kumpletong script na maaari mong kopyahin at i-paste sa iyong Terminal.

Features:
* Awtomatikong gumagawa ng IP Pool at PPP Profile.
* May kasamang sample user account.
* Naka-configure na ang NAT Masquerade para sa internet access.
* May kasamang basic firewall rules para sa seguridad (haharangin ang direktang access mula sa PPPoE users patungo sa router).




MikroTik Script Code


# ============================
# PPPoE SERVER AUTO SCRIPT
# ============================

# --- Create IP POOL ---
/ip pool add name=pppoe_pool ranges=10.10.10.2-10.10.10.254

# --- Create PPP PROFILE ---
/ppp profile add name=pppoe_profile \
    local-address=10.10.10.1 \
    remote-address=pppoe_pool \
    change-tcp-mss=yes only-one=yes \
    use-compression=no use-encryption=no

# --- Add PPPoE user example ---
/ppp secret add name=user1 password=pass1 service=pppoe profile=pppoe_profile

# --- Enable PPPoE Server ---
# Change 'ether2' to your access interface
/interface pppoe-server server add \
    service-name=PPPoE-Server \
    interface=ether2 default-profile=pppoe_profile \
    one-session-per-host=yes disabled=no

# --- NAT Masquerade for internet ---
/ip firewall nat add chain=srcnat action=masquerade out-interface=ether1

# --- Basic firewall rules ---
/ip firewall filter
add chain=input action=accept protocol=icmp comment="Allow Ping"
add chain=input action=accept connection-state=established,related comment="Established connections"
add chain=input action=drop connection-state=invalid comment="Drop invalid"
add chain=input action=drop in-interface=ether2 comment="Block access to router from PPPoE users"

# --- Print summary ---
:log info "PPPoE SERVER INSTALLED SUCCESSFULLY!"





Gabay sa Paggamit:
  1. Buksan ang iyong MikroTik WinBox o mag-log in gamit ang SSH Terminal.
  2. I-click ang New Terminal.
  3. Kopyahin ang code sa itaas at i-paste ito sa terminal window.
  4. Tiyaking papalitan ang ether2 kung saang port nakakonekta ang iyong mga client/switch, at ang ether1 naman kung saan nakakonekta ang iyong internet source (WAN).


Feedback / Questions?
Kung may mga katanungan kayo o nagka-issue habang ginagamit ito, mag-iwan lang ng mensahe sa baba!
salamat sir, ready to paste na ito sa terminal sir?
Want to join the discussion?

Login or create an account to reply.

Login to ReplyCreate Account