Friday, February 4, 2011

instalation mikrotik and configuration


Installation Mikrotik
The following steps are the basics setup is configured proxy for the network simple as a gateway server.
1. The first step is to install RouterOS on a PC
2. Log In Mikrotik Routers via the console:
MikroTik v2.9.7
Login: admin
Password: (blank)
Until this step we've been able to get in on the machine Mikrotik. The default user is admin
and no password, just type in admin and then press the enter key.
3. To change the default password security
[Admin @ MikroTik]> password
old password: *****
new password: *****
Retype new password: *****
[Admin @ MikroTik]]>
4. Renaming Mikrotik Router, in this step the server name will be changed to "killnine" (a name free up if you want to be replaced)
[Admin @ MikroTik]> system identity set name = killnine
[Admin @ killnine]>

5. Viewing interface on Mikrotik Router
[Admin @ killnine]> interface print
Flags: X - disabled, D - dynamic, R - running
# NAME TYPE RX-RATE TX-RATE MTU
0 R ether1 ether 0 0 1500
1 R ether2 ether 0 0 1500
[Admin @ killnine]>
6. Provide the IP address on the interface Mikrotik. Suppose ether1 we will use to connect to the Internet with IP 192.168.0.1 ether2 and we will use for our local network with IP 192.168.0.254
[Admin @ killnine]> ip address add address = 192.168.0.1
netmask = 255.255.255.0 interface = ether1
[Admin @ killnine]> ip address add address = 192.168.0.254
netmask = 255.255.255.0 interface = ether2


7. See the IP address configuration that we give
[Admin @ killnine]> ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.0.1/24 192.168.0.0 192.168.0.63 ether1
1 192.168.0.254/24 192.168.0.0 192.168.0.255 ether2
[Admin @ killnine]>
8. Provide the default gateway, the gateway is assumed to internet connection is 192.168.1.1
[Admin @ killnine]> / ip route add gateway = 192.168.1.1


9. Viewing the routing table on Mikrotik Routers
[Admin @ killnine]> ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf
# DST-ADDRESS G GATEWAY DISTANCE INTERFACE PREFSRC
0 ADC 192.168.0.0/24 192.168.0.254 ether2
1 ADC 192.168.0.0/24 192.168.0.1 ether1
2 A S 0.0.0.0 / 0 r 192.168.1.1 ether1
[Admin @ killnine]>
10. Gateway Ping test to make sure the configuration is correct
[Admin @ killnine]> ping 192.168.1.1
192.168.1.1 64 byte ping: ttl = 64 time <1>
192.168.1.1 64 byte ping: ttl = 64 time <1>
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min / avg / max = 0/0.0/0 ms
[Admin @ killnine]>
11. Setup DNS on Mikrotik Routers
[Admin @ killnine]> ip dns set primary-dns = 202.134.0.155 allow-remoterequests = no
[Admin @ killnine]> ip dns set secondary-dns = 202.134.1.10 allow-remoterequests = no
12. Viewing the DNS configuration
[Admin @ killnine]> ip dns print
primary-dns: 202.134.0.155
secondary-dns: 202.134.1.10
allow-remote-requests: no
cache-size: 2048KiB
cache-max-ttl: 1w
cache-used: 16KiB
[Admin @ killnine]>
13. Tests to access the domain, for example by pinging the domain name
[Admin @ killnine]> ping yahoo.com
216 109 112 135 64 byte ping: ttl = 48 time = 250 ms
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min / avg / max = 571/571.0/571 ms
[Admin @ killnine]>

If it is successful reply means DNS settings are correct.

14. Setup Masquerading, if Mikrotik will serve as our gateway server so that client computers on the network can connect to the internet we need to masquerading.
[Admin @ killnine]> ip firewall nat add action = masquerade outinterface =
ether1 chain: srcnat
[Admin @ killnine]>
15. Viewing configuration Masquerading
[Admin @ killnine]> ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 chain = srcnat out-interface = ether1 action = masquerade
[Admin @ XAVIERO]>
Following these steps can be carried out checks for connections from the local network. And if it means we have successfully managed to install Mikrotik Router as a Gateway server.

No comments:

Post a Comment