Community discussions

MikroTik App
 
wytco0
just joined
Topic Author
Posts: 10
Joined: Wed Feb 11, 2015 6:04 pm

Request for sample script

Wed Oct 21, 2015 1:28 pm

Hi I am struggling to reconfigure my RB2011 to use port 10 as the WAN connection (with PPPoE).

Could someone post a script or a link to something similar to help me configure my router to:

use Port 10 for WAN.
configure PPPoE to use port 10
Configure DHCP to use 192.169.100-200 as addresses

I am sure this is pretty simple but I don't know where to start and a sample script would enable me to have a play.

Thanks
 
scampbell
Trainer
Trainer
Posts: 487
Joined: Thu Jun 22, 2006 5:20 am
Location: Wellington, NZ
Contact:

Re: Request for sample script

Wed Oct 21, 2015 11:51 pm

# remove ether10 from switch group (usually master-port=ether6)
1. /int eth set [find name=ether10] master=none

# create pppoe-client on ether10
2. /int pppoe-client add name=pppoe-out1 interface=ether10 user=changeme password=changeme use-peer-dns=yes add-def=yes dis=no

# add NAT rule to pppoe-client
3. /ip firewall nat add chain=srcnat out-int=pppoe-out1 action=masquerade

# add your firewall rules to protect rouyter and lan (in-interface=pppoe-out1
4. add you firewall rules here !!

# create your new pool, assumes you have existing matching IP and DHCP etc.
5. /ip pool add name=pool-new ranges=192.168.9.100-192.168.9.200
6. edit your DHCP Network to use this new pool

Hope this helps :D
 
wytco0
just joined
Topic Author
Posts: 10
Joined: Wed Feb 11, 2015 6:04 pm

Re: Request for sample script

Thu Oct 22, 2015 12:00 am

# remove ether10 from switch group (usually master-port=ether6)
1. /int eth set [find name=ether10] master=none

# create pppoe-client on ether10
2. /int pppoe-client add name=pppoe-out1 interface=ether10 user=changeme password=changeme use-peer-dns=yes add-def=yes dis=no

# add NAT rule to pppoe-client
3. /ip firewall nat add chain=srcnat out-int=pppoe-out1 action=masquerade

# add your firewall rules to protect rouyter and lan (in-interface=pppoe-out1
4. add you firewall rules here !!

# create your new pool, assumes you have existing matching IP and DHCP etc.
5. /ip pool add name=pool-new ranges=192.168.9.100-192.168.9.200
6. edit your DHCP Network to use this new pool

Hope this helps :D

Thanks I will give this a try.

Who is online

Users browsing this forum: Bing [Bot], gabbot, ryancccc and 29 guests