L2TP with virtual PPP

/ppp profile
add local-address=<IP Virtual PPP> name=<Profile_Name> use-compression=no \
    use-encryption=no use-mpls=no
/interface l2tp-client
add allow=chap,mschap2 connect-to=<Remote_IP> disabled=no max-mru=1460 \
    max-mtu=1460 name=<Interface_Name> password=<Password> profile=<Profile_Name> user=<Username>
/ppp l2tp-secret
add address=<Remote_IP> secret=<Secret>
/system identity
set name=<Expected_hostname>

PPPoE: Routed subnet

#WAN Setup
 #If needed create VLAN
 /interface vlan
 add interface=<WAN interface> name=vlan6 vlan-id=6
 /interface pppoe-client
 add add-default-route=yes allow=pap disabled=no interface=<WAN interface or vlan> max-mru=1492 \
 max-mtu=1492 name=pppoe-EVC1 password=<Password> user=<Username>

#Inside Setup
 /ip address
 add address=<PPPoE IP address>/<Subnet prefix> interface=<Ethernet interface> network=<Subnet Netwerk address>

# DHCP if u want to assign ip adresses autmatic
 /ip pool
 add name=Subnet-DHCP ranges=<IP subnet>/<Subnet prefix>
 /ip dhcp-server
 add address-pool=Subnet-DHCP disabled=no interface=<Ethernet interface> name=\
 Subnet-DHCP
 /ip dhcp-server network
 add address=<IP subnet>/<Subnet prefix> gateway=<PPPoE IP address> netmask=<Subnet prefix>

 

Basic PPPoE

#WAN Setup
 /interface vlan
 add interface=<WAN interface> name=vlan6 vlan-id=6
 /interface pppoe-client
 add add-default-route=yes allow=pap disabled=no interface=vlan6 max-mru=1492 \
 max-mtu=1492 name=pppoe-EVC1 password=<Password> user=<Username>

#LAN Setup
 /interface bridge
 add name=LAN-Bridge
 /interface bridge port
 add bridge=LAN-Bridge interface=<LAN Interface>
 #add bridge=LAN-Bridge interface=<Extra LAN Interface>
 #add bridge=LAN-Bridge etc, etc
 /ip address
 add address=<LAN Gateway address>/24 interface=LAN-Bridge network=<LAN Netwerk address>

# DHCP
 /ip pool
 add name=LAN-DHCP ranges=<LAN SUBNET>/24
 /ip dhcp-server
 add address-pool=LAN-DHCP disabled=no interface=LAN-Bridge lease-time=1d name=\
 LAN-DHCP
 /ip dhcp-server network
 add address=<LAN SUBNET>/24 gateway=<LAN Gateway adres> netmask=24

#Default Firewall configuration
 /ip firewall address-list
 add address=<LAN SUBNET>/24 list=SAFE
 /ip firewall filter
 add action=accept chain=input connection-state=related in-interface=\
 pppoe-EVC1
 add action=accept chain=input connection-state=established in-interface=\
 pppoe-EVC1
 add action=drop chain=input comment="Invalid packets" connection-state=\
 invalid in-interface=pppoe-EVC1
 add action=drop chain=forward connection-state=invalid in-interface=\
 pppoe-EVC1
 add action=reject chain=input in-interface=pppoe-EVC1 protocol=tcp \
 reject-with=icmp-port-unreachable
 add action=reject chain=input in-interface=pppoe-EVC1 protocol=udp \
 reject-with=icmp-port-unreachable
 add action=reject chain=input in-interface=pppoe-EVC1 protocol=icmp \
 reject-with=icmp-admin-prohibited
 add action=log chain=input comment="Log everything else" in-interface=\
 pppoe-EVC1 log=yes log-prefix="DROP INPUT"

#Dynamic NAT
 /ip firewall nat
 add action=masquerade chain=srcnat out-interface=pppoe-EVC1 src-address-list=\
 SAFE

#Services
 /ip service
 set telnet disabled=yes
 set ftp disabled=yes
 set www address=<LAN SUBNET>/24 port=80
 set ssh disabled=yes
 set api disabled=yes
 set winbox address=<LAN SUBNET>/24
 set api-ssl disabled=yes

#Other
 /system clock
 set time-zone-name=Europe/Amsterdam

Variables:
 <WAN interface>
 <username>
 <password>
 <LAN Interface>
 <LAN Gateway adres>
 <LAN Netwerk adres>
 <LAN SUBNET>