Mikrotik
(Różnice między wersjami)
(→Skrypt) |
|||
Linia 4: | Linia 4: | ||
===Skrypt=== | ===Skrypt=== | ||
+ | ====W odpowiednie miejsca należy wpisać odpowiednie dane (loginy, hasła, adresy IP)==== | ||
<pre># may/27/2013 11:20:45 by RouterOS 6.0rc13 | <pre># may/27/2013 11:20:45 by RouterOS 6.0rc13 | ||
# software id = 2AQU-CN1X | # software id = 2AQU-CN1X |
Wersja z 08:54, 17 cze 2013
Skrypt do konfiguracji urządzeń Mikrotik.
Konfiguracja Mikrotik
Skrypt
W odpowiednie miejsca należy wpisać odpowiednie dane (loginy, hasła, adresy IP)
# may/27/2013 11:20:45 by RouterOS 6.0rc13 # software id = 2AQU-CN1X # /interface ethernet set 0 name=ether1 set 1 name=ether2 set 2 name=ether3 /interface wireless set 0 band=2ghz-b/g disabled=no frequency=2442 l2mtu=2290 mode=ap-bridge \ name=wlan14 ssid=Mikrotok wireless-protocol=unspecified /ip neighbor discovery set wlan14 discover=no /ip hotspot user profile set [ find default=yes ] idle-timeout=none keepalive-timeout=2m /ip pool add name=dhcp_pool1 ranges=192.168.25.2-192.168.25.254 /ip dhcp-server add address-pool=dhcp_pool1 disabled=no interface=wlan14 name=dhcp1 /port set 0 name=serial0 /ppp profile set 0 local-address=78.31.88.252 /interface pppoe-server server add authentication=chap disabled=no interface=wlan14 one-session-per-host=yes \ service-name=testowy /ip address add address=78.31.88.252/24 interface=ether2 network=78.31.88.0 add address=192.168.25.1/24 interface=wlan14 network=192.168.25.0 /ip dhcp-client add dhcp-options=hostname,clientid disabled=no interface=ether2 /ip dhcp-server network add address=192.168.25.0/24 dns-server=78.31.90.58 gateway=192.168.25.1 /ip dns set allow-remote-requests=yes servers=78.31.90.58 /ip dns static add address=192.168.88.1 name=router /ip firewall filter add action=jump chain=forward jump-target=ppp add action=add-src-to-address-list address-list=przekierowanie \ address-list-timeout=10m chain=przypominajka dst-address=!78.31.90.8 add chain=forward comment="Akceptujemy ruch dnsa" dst-port=53 protocol=udp \ src-address-list=przekierowanie add chain=forward comment=\ "Akceptujemy ruch o strony z komunikatem i do panelu usera" dst-address=\ 78.31.90.8 src-address-list=przekierowanie add action=drop chain=forward comment=\ "Blokujemy ruch z komputer\F3w z komunikatami" src-address-list=\ przekierowanie /ip firewall nat add action=redirect chain=dstnat comment=Przekierowanie dst-port=80 protocol=\ tcp src-address-list=przekierowanie to-ports=8080 add action=masquerade chain=srcnat src-address=192.168.0.0/24 add action=masquerade chain=srcnat src-address=10.0.10.0/24 /ip proxy set enabled=yes max-cache-size=none src-address=78.31.88.252 /ip proxy access add comment="Akceptujemy ruch do strony z komunikatem" dst-address=78.31.90.8 add comment="Ruch do mBank" dst-host=*.mbank.pl src-address=0.0.0.0/0 add comment="Ruch do mBank" dst-host=*.mbank.com.pl src-address=0.0.0.0/0 add comment="Ruch do BZWBK" dst-host=*.centrum24.pl src-address=0.0.0.0/0 add comment="Ruch do BZWBK" dst-host=*.bzwbk.pl src-address=0.0.0.0/0 add action=deny comment="Przekierowujemy ruch na adres url" dst-port=80 \ redirect-to=nowynet.ostrog.net/notification src-address=0.0.0.0/0 /ip proxy direct add action=deny src-address=0.0.0.0/0 /ip route add distance=1 gateway=78.31.88.254 /ip traffic-flow set enabled=yes /ip traffic-flow target add address=78.31.90.8:12345 version=5 /ppp aaa set interim-update=15m use-radius=yes /radius add address=78.31.90.8 secret=amen service=ppp /system clock set time-zone-name=Europe/Warsaw /system logging add disabled=yes topics=radius add disabled=yes topics=pppoe add disabled=yes topics=ssh add action=disk disabled=yes topics=debug /system ntp client set enabled=yes mode=unicast primary-ntp=78.31.90.8 /system routerboard settings set cpu-frequency=533MHz