Community discussions

MikroTik App
 
connollyg
just joined
Topic Author
Posts: 5
Joined: Mon Mar 05, 2012 10:46 pm

Configuring my first router

Mon Mar 05, 2012 11:15 pm

Trying to get my head round how to setup a RB750.

Its a simple config, i just need to connect multiple clients (probably mostly smart phones) to my Windows 7 server. The clients will be connected via a WLAN, so i need to use DHCP.

My backbone LAN is running on a 192.168.0.xxx subnet and my server is 192.168.0.20, and although i have the attached config i found on the web somewhere, it doesnt seem to work for me, i have tried changing the gateway addresses to that of my server but it doesnt work, what am i doing wrong?

; RB750
; Remove default configuration
; Winbox open new termial on left side of screen
; /system reset-config
; RB750 should reboot. Log back in using winbox. Ensure PC is plugged into Ethernet port 2
; Open terminal and it will ask to remove default config. Answer yes
; Assumption: Ethernet Port 1 will using a static public IP to backbone
; Ethernet port 2 -5 NAT
; Use DHCP pool range xxx.xxx.xxx.25 - xxx.xxx.xxx.200
; Maybe use static IP for Ubiquiti LAN and WLAN??? Not sure AP router or bridge
;
;

Lab Test Router Setup
;
; Uncomment the following line if using dhcp on eth1
;/ip dhcp-client add interface=ether1 disabled=no


/ip address
; Comment out the following two lines if using dhcp on ether1
add address=136.138.60.220/29 network=136.138.60.216 broadcast=136.138.60.223 \
interface=ether1 comment="" disabled=no
add address=192.168.2.1/24 network=192.168.2.0 broadcast=192.168.2.255 \
interface=ether2 comment="" disabled=no
add address=192.168.3.1/24 network=192.168.3.0 broadcast=192.168.3.255 \
interface=ether3 comment="" disabled=no
add address=192.168.4.1/24 network=192.168.4.0 broadcast=192.168.4.255 \
interface=ether4 comment="" disabled=no
add address=192.168.5.1/24 network=192.168.5.0 broadcast=192.168.5.255 \
interface=ether5 comment="" disabled=no

/ip route
; Comment out the following two lines if usinging dhcp client on ether1
add comment="default route" disabled=no distance=1 dst-address=0.0.0.0/0 \
gateway=136.138.60.217 scope=30 target-scope=10
; Comment out the following two lines if you are using dhcp client on ether1
; This will work for either dhcp or static. The above is used for clarity
;add comment="default route" disabled=no distance=1 dst-address=0.0.0.0/0 \
; gateway=ether1 scope=30 target-scope=10


/snmp
set enabled=yes contact="support@getalife.com" location="lab-test-rtr1"
/ snmp community
add name="go4it" address=0.0.0.0/0 read-access=yes

/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
max-udp-packet-size=512 primary-dns=136.138.32.37 secondary-dns=\
136.138.32.45


/ system ntp client
set enabled=yes mode=unicast primary-ntp=136.138.0.75 secondary-ntp=0.0.0.0

/ system identity
set name="lab-test-rtr1"

# Protect your RouterOs router
/ ip firewall filter
add chain=input connection-state=invalid action=drop \
comment="Drop Invalid connections"
add chain=input connection-state=established action=accept \
comment="Allow Established connections"
add chain=input protocol=udp action=accept \
comment="Allow UDP"
add chain=input protocol=icmp action=accept \
comment="Allow ICMP"
add chain=input src-address=136.138.0.0/18 action=accept \
comment="Allow access to router from lab network"
add chain=input action=drop comment="Drop anything else"

# Protecting the Customer's Network
/ip firewall filter
add chain=forward protocol=tcp connection-state=invalid \
action=drop comment="drop invalid connections"
add chain=forward connection-state=established action=accept \
comment="allow already established connections"
add chain=forward connection-state=related action=accept \
comment="allow related connections"


/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" disabled=\
no out-interface=ether1

/ip pool
add name=dhcp_pool2 ranges=192.168.2.25-192.168.2.200
add name=dhcp_pool3 ranges=192.168.3.25-192.168.3.200
add name=dhcp_pool4 ranges=192.168.4.25-192.168.4.200
add name=dhcp_pool5 ranges=192.168.5.25-192.168.5.200

/ip dhcp-server
add address-pool=dhcp_pool2 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether2 lease-time=3d name=dhcp2 relay=\
192.168.2.1
add address-pool=dhcp_pool3 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether3 lease-time=3d name=dhcp3 relay=\
192.168.3.1
add address-pool=dhcp_pool4 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether4 lease-time=3d name=dhcp4 relay=\
192.168.4.1
add address-pool=dhcp_pool5 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether5 lease-time=3d name=dhcp5 relay=\
192.168.5.1
/ip dhcp-server config
set store-leases-disk=5m
/ip dhcp-server network
add address=192.168.2.0/24 comment="" gateway=192.168.2.1
add address=192.168.3.0/24 comment="" gateway=192.168.3.1
add address=192.168.4.0/24 comment="" gateway=192.168.4.1
add address=192.168.5.0/24 comment="" gateway=192.168.5.1

Who is online

Users browsing this forum: CGGXANNX, GoogleOther [Bot], mhdziad, VMX and 65 guests