Community discussions

MikroTik App
 
LdB
Member Candidate
Member Candidate
Topic Author
Posts: 141
Joined: Thu May 20, 2021 4:23 pm

PPPOE client with DHCP NAT for clients

Wed Sep 07, 2022 6:15 am

I have a PPPOE client setup on a tik which gets a public IP from ISP
The router establishes connection and has internet and I can ping anywhere and everywhere
I setup the DHCP server onto a ethernet port and have a NAT masquerade from the source IP range to the PPPOE-out interface

very basic config as per below but no internet on ether1 ... but laptop gets DHCP lease and all correct
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether2 \
    keepalive-timeout=60 name=PPPOE-out use-peer-dns=yes user=*******
/ip pool
add name=dhcp_pool1 ranges=192.168.10.10-192.168.10.249
/ip address
add address=192.168.10.1/24 interface=ether1 network=\
    192.168.10.0
/ip dhcp-server
add address-pool=dhcp_pool1 interface=ether1 name=dhcp1
/ip dhcp-server network
add address=192.168.10.0/24 dns-server=1.1.1.1,9.9.9.9 gateway=192.168.10.1
/ip firewall filter
add action=accept chain=input comment="accept established,related,untracked" \
    connection-state=established,related
add action=accept chain=input comment="accept ICMP" protocol=icmp
add action=drop chain=input comment="Drop invalid" connection-state=invalid
add action=fasttrack-connection chain=forward comment=FastTrack \
    connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="Established, Related" \
    connection-state=established,related
add action=drop chain=forward comment="Drop invalid" connection-state=invalid \
    log=yes log-prefix=invalid
/ip firewall nat
add action=masquerade chain=srcnat out-interface=PPPOE-out src-address=192.168.10.0/24

Who is online

Users browsing this forum: Bing [Bot], CJWW, orionren and 43 guests