Page 1 of 1

Request for sample script

Posted: Wed Oct 21, 2015 1:28 pm
by wytco0
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

Re: Request for sample script

Posted: Wed Oct 21, 2015 11:51 pm
by scampbell
# 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

Re: Request for sample script

Posted: Thu Oct 22, 2015 12:00 am
by wytco0
# 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.