Friday, June 24, 2011

setting internet with mikrotik os

MikroTik RouterOS is the operating system and software that can be used to make computer manjadi reliable network routers, includes a variety of features designed for IP networks and wireless networks, suitable for use by ISPs and hotspot providers

The following steps so that we can use Mikrotik as a router for internet.

1. The first step we change the name of the ethernet to make it easier to do the configuration settings.


[admin@MikroTik] > interface set ether1 name=public
[admin@MikroTik] > interface set ether2 name=local


2. Setting ip for ethernet


[admin@MikroTik] > ip address add address=192.168.1.45/24 interface=public 
[admin@MikroTik] > ip address add address=192.168.0.1/24 interface=local 


3. Setting IP gateway

[admin@MikroTik] > ip route add gateway=192.168.1.1

4. Setting DNS

[admin@MikroTik] > ip dns set primary-dns=202.169.224.3 allow-remote-requests=
yes
[admin@MikroTik] > ip dns set primary-dns=202.169.224.4 allow-remote-requests=
yes 

5.  Check for domain access, for example by pinging a domain name
[admin@MikroTik] > ping google.com
74.125.235.17 64 byte ping: ttl=54 time=27 ms
74.125.235.17 64 byte ping: ttl=54 time=28 ms
74.125.235.17 64 byte ping: ttl=54 time=28 ms
74.125.235.17 64 byte ping: ttl=54 time=27 ms
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 27/27.5/28 ms

6. Setup Masquerading, if Mikrotik will we use it as a gateway server to the client computer on the network can connect to the internet we need to masquerading.

[admin@MikroTik] > ip firewall nat add action=masquerade out-interface=public 
chain=srcnat 

7. See the result of nat

[admin@MikroTik] > ip firewall nat print 
Flags: X - disabled, I - invalid, D - dynamic 
 0   chain=srcnat action=masquerade out-interface=public 

8. ip settings to computer client


9. afther that, we can do ping to google.com on command promt or browsing to internet






No comments:

Post a Comment