- Vivo X200 Pro - a kétszázát!
- Yettel topik
- Telekom mobilszolgáltatások
- Samsung Galaxy S25 - végre van kicsi!
- Okosóra és okoskiegészítő topik
- Három Redmi 15 érkezett a lengyel piacra
- Android alkalmazások - szoftver kibeszélő topik
- One mobilszolgáltatások
- Samsung Galaxy Z Flip5 - ami kint, az van bent
- Samsung Galaxy A56 - megbízható középszerűség
Hirdetés
-
Mobilarena
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
-
gra3o
csendes tag
Sziasztok!
Van valakinek tapasztalata Mikrotik VPN (L2TP+IPSEC) kapcsolattal?
Röviden a probléma: A Mikrotik routerbe kellene kapcsolódnom L2TP-n keresztül IPsec titkosítással. A kapcsolat látszólag odaáig jut el, hogy az IPsec felépül majd kidob.
-
gra3o
csendes tag
no-ip-t használok, de nem ez volt a lényeg, hanem, hogy a kívülre fwd-olt porton érjem el belülről is a service-t.
Ez a script amúgy tudja mindkettőt, illetve publikus ipt is csekkolhatsz vele nem csak a külső láb ip-jét.
#************************************************************************************************
# Parameters
#************************************************************************************************
:local username "your username"
:local password "password"
:local hostname "hostname"
#availabe options: "http" or "iface"
# - http: will query an external server and discover you public ip (userful for NATted connections)
# - iface: will use the ip address assigned to the $iface interface (see below)
:local discoverBy "http"
# interface used to get ip address from (only if discoverBy = iface)
:local iface "public-dsl"
# current available services: "dyndns", "noip" and "changeip"
:local service "noip"
# number of days to force an update if your IP did not change (helps keeping your account active)
:local forceUpdate 15
#************************************************************************************************
# do not change below this unless you know what you are doing
#************************************************************************************************
:local force
:global lastUpdate
:local currentIP
:if ($discoverBy="http") do={
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:local result [/file get dyndns.checkip.html contents]
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "</body>" -1]
:set currentIP [:pick $result $startLoc $endLoc]
} else={
:set currentIP [ /ip address get [find interface=$iface disabled=no] address ]
:for i from=( [:len $currentIP] - 1) to=0 do={
:if ( [:pick $currentIP $i] = "/") do={ :set currentIP [:pick $currentIP 0 $i] }
}
}
#get IP from DynDNS for our hostname
:local resolvedIP [:resolve $hostname]
# get current date in format mm/DD/YYYY
:local date [ /system clock get date ]
# convert to YYYYMMDD
:local months ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");
:local month [ :pick $date 0 3 ]; :local day [ :pick $date 4 6 ]; :local year [ :pick $date 7 11 ];
:local mm ([ :find $months $month -1 ] + 1);
:if ($mm < 10) do={ :set month ("0" . $mm); } else={ :set month $mm; }
:set date ($year . $month . $day);
:if ([ :typeof $lastUpdate ]=[:nothing] || (($date-$lastUpdate) >= $forceUpdate && $forceUpdate > 0)) do={
:set force true
}
:put ("Current IP: $currentIP ($discoverBy), Last update: $lastUpdate")
# Determine if dyndns update is needed
:if (($currentIP != $resolvedIP) || ($force = true)) do={
:if ($service = "dyndns") do={
/tool fetch user=$username password=$password mode=http address="members.dyndns.org" \
src-path="/nic/update?hostname=$hostname&myip=$currentIP" dst-path="/output.txt"
}
:if ($service = "noip") do={
/tool fetch user=$username password=$password mode=http address="dynupdate.no-ip.com" \
src-path="/nic/update?hostname=$hostname&myip=$currentIP" dst-path="/output.txt"
}
:if ($service = "changeip") do={
/tool fetch user=$username password=$password mode=http address="nic.changeip.com" \
src-path="/nic/update?hostname=$hostname&myip=$currentIP" dst-path="/output.txt"
}
:local result [/file get output.txt contents]
:log info ("dynamic-dns-updater: Service = $service, Hostname = $hostname")
:log info ("dynamic-dns-updater: CurrentIP = $currentIP, Resolved IP = $resolvedIP")
:log info ("dynamic-dns-updater: Update result: ".$result)
/ip dns cache flush
:set lastUpdate $date
} -
gra3o
csendes tag
Nekem viszont lenne egy olyan kérdésem, hogy dinamikus dnssel hogy lehetne megoldani, hogy belülről is ugyanazon a címen és porton elérjek egy szervert, mint kívülről.
Butának tűnhet a kérdés, de nem szeretnék kétszer felvenni pl. egy ssh kapcsolatot külön arra az esetre ha kívül vagyok, illetve ha belül.
Jól gondolom, hogy egy belső masquerade szabály kellene ehhez?
Előre is köszi
Új hozzászólás Aktív témák
Hirdetés
- Szép HP EliteBook 840 G9 Fémházas Hordozható Érintős Ultrabook 14" -40% i5-1235U 32/1TB Iris Xe FHD+
- Logitech G935
- Creative Sound Blaster Live! 5.1-es digitális PCI hangkártya
- Rock Shox Recon Silver Air gyorszáras villa eladó (29-es)!
- ÚJ Nvidia RTX 5060/TI 8-16Gb GDDR7 DLSS4.0 Ryzen 7 5800X 16x4.7Ghz/32GB/512Gb/1TB M SSD/2ÉV gamer PC
- Dell 5050 i5 7500 8Gb RAM 128Gb SSD
- Hordozható Gamer Számítógép / PC! HP Omen X 1000P / I7 7820HK / GTX 1080 8GB / 16GB DDR4
- HIBÁTLAN iPhone 14 Pro 128GB Gold -1 ÉV GARANCIA - Kártyafüggetlen, MS3029, 90% Akkumulátor
- Gamer PC-Számítógép! Csere-Beszámítás! I5 14400F / RX 6900XT 16GB / 32GB DDR5 / 1TB SSD
- Azonnali készpénzes AMD Ryzen 1xxx 2xxx 3xxx 5xxx processzor felvásárlás személyesen / csomagküldés
Állásajánlatok
Cég: FOTC
Város: Budapest