sulax.files. file · web view[admin@mikrotik] > ip firewall nat add chain=srcnat...

Post on 05-Feb-2018

220 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

[admin@MikroTik] > interface set 0 name=wan

[admin@MikroTik] > interface set 1 name=lan

[admin@MikroTik] > ip address add address=192.168.1.24/24 interface=wan

[admin@MikroTik] > ip address add address=192.168.100.1/24 interface=lan

[admin@MikroTik] > ip address add address=192.168.200.1/24 interface=wlan1

[admin@MikroTik] > ip dns set server=8.8.8.8,8.8.4.4 allow-remote-requests=yes

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

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

[admin@MikroTik] > ping 192.168.1.254

SEQ HOST SIZE TTL TIME STATUS

0 192.168.1.254 56 254 1ms

1 192.168.1.254 56 254 0ms

2 192.168.1.254 56 254 0ms

sent=3 received=3 packet-loss=0% min-rtt=0ms avg-rtt=0ms max-rtt=1ms

[admin@MikroTik] > ip dhcp-server setup

Select interface to run DHCP server on

dhcp server interface: lan

Select network for DHCP addresses

dhcp address space: 192.168.100.0/24

Select gateway for given network

gateway for dhcp network: 192.168.100.1

Select pool of ip addresses given out by DHCP server

addresses to give out: 192.168.100.2-192.168.100.100

Select DNS servers

dns servers: 8.8.8.8,8.8.4.4

Select lease time

lease time: 3d

[admin@MikroTik] > ip dhcp-server setup

Select interface to run DHCP server on

dhcp server interface: wlan1

Select network for DHCP addresses

dhcp address space: 192.168.200.0/24

Select gateway for given network

gateway for dhcp network: 192.168.200.1

Select pool of ip addresses given out by DHCP server

addresses to give out: 192.168.200.2-192.168.200.100

Select DNS servers

dns servers: 8.8.8.8,8.8.4.4

Select lease time

lease time: 3d

[admin@MikroTik] > ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=dst-nat to-address=192.168.100.1 to-port=8080

[admin@MikroTik] > ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=dst-nat to-address=192.168.200.1 to-port=8080

[admin@MikroTik] > ip proxy access add path=*.mp3 action=deny

[admin@MikroTik] > ip proxy access add path=*.mkv action=deny

[admin@MikroTik] >

top related