Hirdetés
- Kormányok / autós szimulátorok topikja
- Milyen billentyűzetet vegyek?
- Pánik a memóriapiacon
- Amazon Fire TV stick/box
- Milyen monitort vegyek?
- 5.1, 7.1 és gamer fejhallgatók
- Milyen videókártyát?
- 3D-s gyorsítótárat mindenkinek!
- Nem indul és mi a baja a gépemnek topik
- Őrületes specifikációkkal rendelkezik a Tachyum csodaprocesszora
-
PROHARDVER!
Mikrotik routerekkel foglalkozó téma. Mikrotik router típusok, hardverek, router beállítások, programozás (scriptek írása), frissítés, és minden Mikrotik routerrel kapcsolatos beszélgetés helye.
Új hozzászólás Aktív témák
-
Proxy2
aktív tag
válasz
TonTomika
#1231
üzenetére
Én mindíg bele írom az aktuális IP címem egy current_ip address list elembe, és erre hivatkozom a nat szabálynál. Ez a DDNS update script végzi, ami így néz ki:
# HomingBeacon Main Dynamic DNS Update Script
# Written by Sam Norris, ChangeIP.com
# 20100728 Tested on RouterOS 4.9
# 20110511 Tested on RouterOS 5.2
# 201512.01 Tested on RouterOS 6.33.3 by Proxy5
# Set your specific ChangeIP.com preferences here.
:global ddnsuser "emailcimed@valami.com"
:global ddnspass "jelszo"
:global ddnshost "hostneved.akarmi.com"
# Change ddnsport to 8245 to bypass proxy.
:local ddnsport 80
# Do not edit anything below this line. You have been warned.
# Abusive updates to the system will cause firewall blocks.
# Please be considerate and
# do not let this script run more than once per 3-5 minutes.
:log info "DDNS: Starting."
# Initialize checkpoint
:global ddnscheckpoint
:if ([:typeof $ddnscheckpoint] = "time") do={
:log info ("DDNS: Last check was " . ([/system clock get time] - $ddnscheckpoint))
} else={
:log info "DDNS: Cannot determine checkpoint, set now."
:global ddnscheckpoint ( [/system clock get time] - 1d )
}
# Get the current IP
:if ([/system clock get time] - $ddnscheckpoint > [:totime 180s] || [/system clock get time] - $ddnscheckpoint < [:totime 0s]) do={
:log info "DDNS: Performing remote IP detection."
/tool fetch address="ip.changeip.com" host="ip.changeip.com" src-path=("/?" . [/int eth get 0 mac-address ]) dst-path="ip.changeip.com.txt" mode=http port=$ddnsport
:global ddnscheckpoint [/system clock get time]
} else={
:log info "DDNS: Please be considerate and wait a few seconds longer."
:break
}
# Parse the IP address received from fetch script.
:global ddnslastip
:local html [/file get "ip.changeip.com.txt" contents]
:local ddnsip [:pick $html ([:find $html "<!--IPADDR="] + 11) [:find $html "-->"] ]
# Is it a valid IP and is it different than the last one?
:if ([:typeof [:toip $ddnsip]] = "ip" AND $ddnsip != $ddnslastip ) do={
:log info "DDNS: Sending UPDATE with $ddnsip"
:log info [/tool dns-update name=$ddnshost address=$ddnsip key-name=$ddnsuser key=$ddnspass ]
:global ddnslastip $ddnsip
/ip firewall address-list
:foreach i in=[find list="current_IP"] do=[remove $i]
#New adrdres to
/ip firewall address-list add address=$ddnsip list=current_IP
} else={
:log info "DDNS: No update required."
}
}Remélem nem kotlik meg a forum ettől.
Ha mégsem olvasható, akkor innen letölthető. -
csusza`
senior tag
válasz
TonTomika
#1231
üzenetére
DDNS-t nem állítottál be a Mikrotiken? Én azon keresztül férek hozzá az itthoni dolgokhoz, a PPPoE dinamkius IP címkiosztása miatt. Vagy van más megoldás is erre?
+: A napokban pont szívtam a DDNS-el (no-ip). Egyik napról a másikra nem értem el a routerem konfigurációját. Egyszerűen hiába próbálta a router befrissíteni az IP-címem, a router azt írta, hogy OK, az oldalon belül meg még valami ezer éves IP volt. Kiötöltem a ddns-címet, újra hozzáadtam, azóta megint jó.
-
MtHq
tag
válasz
TonTomika
#1231
üzenetére
PPPoE kapcsolatnál én úgy építek nat szabályt általában, hogy nem a DST addresst töltöm ki (fix ipnél úgy szokás), hanem in-interface: a pppoe interfész neve. Pl. wan0 (nekem). A dst address és address listhez pedig semmi.
Példa egy működő routeremről:
/ip firewall nat add action=dst-nat chain=dstnat dst-port=11111 in-interface=wan1 protocol=tcp to-addresses=192.168.16.254
Új hozzászólás Aktív témák
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPad 9th Gen 256GB, Wi-Fi+Cellular, Kártyafüggetlen, 1 Év Garanciával
- Samsung Galaxy A53 5G 128GB, Kártyafüggetlen, 1 Év Garanciával
- GYÁRI TÖLTŐK DELL LENOVO HP FUJITSU TOSHIBA Macbook---------- Budapest,/MPL/Foxpost
- LG 25GR75FG - E-Sport Monitor - FHD 360Hz 1ms - NVIDIA Reflex + G-sync - AMD FreeSync - HDR 400
- GYÖNYÖRŰ iPhone 13 mini 128GB Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS3293, 100% Akksi
- Eredeti Lenovo 90W szögleges laptop táp + kerek átalakító egyben eladó
- BESZÁMÍTÁS! MSI B450M R5 3600X 16GB DDR4 512GB SSD RTX 2060 Super 8GB GameMax STORM Black 600W
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest
ekkold

