Wednesday, January 28, 2015

pppoe server in mikrotik

A.O.A

First we will configure interface that is connected to WAN.
/ ip address add address=172.16.10.50/16 network=172.16.0.0 broadcast=172.16.255.255 interface=ether1

Now one interface is configured and connected to WAN (with ip 172.16.10.50/16). Now we will configure second interface for our Local Network.

/ ip address add address=10.10.10.1/24 network=10.10.10.0 broadcast=10.10.10.255 interface=ether2




Now goto IP > Pool. Press the PLUS sign in RED, then create a IP 
Address Pool that will be used by the PPPoE to give out IP (i am using 
10.10.10.10-10.10.10.250) Press APPLY and OK. It should look something 
like this.





Now we will create a PPPoE Server. Goto PPP then press PLUS sign and select PPPoE Server, a new small window will popup, just press APPLY and OK. You will see a window similar to this one after you press APPLY and OK.






Now we will setup the main PPPoE Server. Press the button which says 
"PPPoE Server" in the same window. A new window will popup, press the 
PLUS sign to add a PPPoE Server. Now set the Service Name=pppoe-server 
(or whatever you like), then select the interface connected to local 
network (here i have selected ether2). Dont change the values of max MTU
 and max MRU. Uncheck the button Keepalive Timeout, select the option 
"Once Session per host". At the bottom of the window you can see 4 
authenticaion methods, here only select PAP, and unselect all others. It
 should look something like this. Now press APPLY and OK.






Now we will create a profile that will be used by different users. Goto 
the main PPP window, goto Profiles tab, here you will see two profiles 
by default, dont do any thing to these default profiles, create a new 
profile by pressing the PLUS sign. Name the profile what ever you like 
(here i have named it name=profile512). Local Address is the address of 
the server (here it is 10.10.10.1) local-address=10.10.10.1. In Remote 
Address box press the down arrow button you will see the name of the 
pool that we created in the first step, select it. If you dont see the 
name of the pool dont worry, name type the name of the pool in the 
Remote Address Location. In the DNS Server, enter the IP of your SERVER 
(here i am using mikrotik as my DNS Server) DNS-Server=10.10.10.1. Then 
goto Limits tab in the same window, now here we have to setup the 
bandwidth rate at which the users using this profile will be restricted 
at. Here set the Rate Limit (tx/rx) to what ever you like (i am setting 
it to 512k up/down). Then press APPLY and OK. Your settings should be a 
bit similar to settings shown below.






Now we will create users. In the main PPP window goto Secrets tab, then 
press the PLUS sign to add a new user. Name is the UID ( here i am 
setting it to test), set the password ( i am setting here to test). Now 
in the service box, select "pppoe", in the profile select the profile 
that we created in the previous step profile="profile512". Dont change 
any thing else. Just press APPLY and OK. Setting should be similar to 
this.




Our PPPoE Server Setup is complete, however Internet right now will 
not be working at any cleint. Now we will setup NAT and ROUTE and DNS so
 that internet will also work on the clients.

Goto IP > Firewall. In the NAT tab add a new FIREWALL rule, press the PLUS sign. chain=srcnat , src.address=10.10.10.0/24 , then goto Action's tab in the same window, select action=masquerade. Then press APPLY and OK.
Now we will setup Default ROUTE. Goto IP > Routes , in here add a new Static ROUTE by pressing PLUS sign. Destination=0.0.0.0/0 , set the gateway to the gateway of the interface connected to INTERNET or the main IP of your ADSL Router (here its 172.16.10.1) gateway=172.16.10.1. Then Press APPLY and OK
Now the last and final step, setup DNS Server on Mikrotik Router. Goto IP > DNS, press the settings butting. Enter the primary and secondary DNS Server's IP provided by your ISP (here i have a DNS Server on my network i am using that) primary DNS=172.16.10.1 , also select "Allow Remote Request" this will make your Mikrotik Router act as a DNS Server. Notice that i have setup the Cache size=10000 , if you want you can change that, its not that big deal. Now press APPLY and OK.
now you join pppoe server
Created by Faraz Ali
Read more »

hotspot configuration in mikrotik

Hotspot Server Setup with Profiles

In this article i will cover how to setup HOTSPOT Server with different profiles.

First we will configure interface that is connected to WAN.
/ ip address add address=192.168.1.5/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether1

Now one interface is configured and connected to WAN (with ip 192.168.1.5/24). Now we will configure second interface for our Local Network.

/ ip address add address=10.10.0.1/24 network=10.10.0.0 broadcast=10.10.0.255 interface=ether2



Now we have both our interfaces configured and working. Next we will 
setup our Mikrotik ROS as a DNS Server as it is a very good practice for
 setting up a DNS server. Goto IP > DNS then press Settings button 
and fill in the appropriate information as per provided by your ISP, 
when done select the "ALLOW REMOTE REQUEST" line (it will allow requests
 from your cleints to be processed).





Now we will setup a default ROUTE. Goto IP > Routes, press the plus 
sign. Leave the destination field as it is, in the GATEWAY field enter 
the IP Address of the GATEWAY of you WAN interface.







Now we will setup our HOTSPOT Server. Goto IP > Hotspot, in the 
server tab you will see a button "Hotspot Setup" press it. A new window 
will popup asking you on which interface you want to setup HOTSPOT, here
 select the interface that is connected to local network (in our example
 it is ether2). Press NEXT.

















    Your Hotspot server is ready and configured. Now if you recieve a 
message saying Router Disconnected, dont worry its just the security of 
HOTSPOT. First login to the HOTSPOT with user name and password that you
 created in STEP 8. Now again open the WINBOX and again goto IP > 
Hotspot.







Now we will create a new user that will use the profile that we just 
created. Goto Users TAB in the same window. Press the plus sign, Select 
the specific server or Select ALL. Set the User Name and Password for 
the user. In the Profile Filed select the profile that we created in the
 previous step. Press APPLY and OK.








CONGRATULATIONS!!!!
Your HOTSPOT Server is configured and running. Now test it.

Article by faraz ali

Read more »