#1

 ✅ MIKROTIK PPPoE SERVER SCRIPT (FULL AUTOMATION)

# ============================

# 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!"

--Forum Rules --BBcodes


image quote pre code