Mikrotikga statik IP bo’lmaganda masofadan ulanish

Ko‘pgina provayderlar foydalanuvchilarga statik IP manzil bermaydi, natijada MikroTik routeriga masofadan ulanish qiyinlashadi. Bu muammoni hal qilish uchun Dynamic DNS (DDNS) yoki VPN ishlatish mumkin.

1. MikroTik’da DDNS orqali Ulanish

MikroTik routerida DDNS xizmati mavjud bo‘lib, bu orqali IP o‘zgarishiga qaramasdan routerga doimiy nom bilan ulanish mumkin.

1.1. MikroTik DDNS’ni yoqish

  1. MikroTik’ga kirish uchun Winbox yoki SSH orqali ulaning.
  2. IPCloud bo‘limiga kiring.
  3. “DDNS Enabled” opsiyasini yoqing.
  4. “Update Time” opsiyasini ham yoqing.
  5. “DNS Name” maydonida MikroTik tomonidan berilgan domen nomini yozib oling. Masalan: 123456.sn.mynetname.net
  6. “Apply” va “OK” tugmalarini bosing.

Eslatma: MikroTik Cloud xizmatining ishlashi uchun internet ulanishi bo‘lishi shart.

1.2. MikroTik DDNS orqali ulanish

DDNS yoqilgandan so‘ng, MikroTik’ga masofadan SSH, Winbox yoki WebFig orqali quyidagi manzil bilan ulanishingiz mumkin:

winbox://123456.sn.mynetname.net

yoki

ssh admin@123456.sn.mynetname.net

2. No-IP orqali DDNS ro‘yxatdan o‘tish va ulash

Agar MikroTik Cloud DDNS xizmati yetarli bo‘lmasa yoki alternativ variant istasangiz, No-IP xizmatidan foydalanishingiz mumkin.

2.1. No-IP’da hisob yaratish

  1. No-IP saytiga kiring.
  2. “Sign Up” tugmasini bosing.
  3. Email, username va password kiriting.
  4. “Create My Free Account” tugmasini bosing.
  5. Elektron pochtangizga kelgan tasdiqlash xatini ochib, hisobingizni faollashtiring.
  6. No-IP boshqaruv paneliga kiring va “Dynamic DNS” bo‘limida yangi Hostname yarating (masalan, mikrotik.ddns.net).

2.2. MikroTik’ga No-IP sozlash

  1. MikroTik’da SystemScheduler bo‘limiga kiring.
  2. “Add New” tugmasini bosing va quyidagi skriptni qo‘shing:
/system script
add name=noip_ddns_update policy=read,write source=
"/tool fetch url=\"http://dynupdate.no-ip.com/nic/update?hostname=mikrotik.ddns.net&myip=\$[/ip cloud get public-address]\" \ 
  user=\"YOUR_NOIP_USERNAME\" password=\"YOUR_NOIP_PASSWORD\" mode=http"
  1. “Apply” va “OK” tugmalarini bosing.
  2. SystemScheduler bo‘limiga qayting va 5 daqiqalik oraliqda avtomatik ishga tushadigan jadval yarating.

Eslatma: YOUR_NOIP_USERNAME va YOUR_NOIP_PASSWORD ni o‘z ma’lumotlaringiz bilan almashtiring.

2.3. No-IP orqali ulanish

Endi MikroTik’ga quyidagi manzil orqali ulanishingiz mumkin:

winbox://mikrotik.ddns.net

3. MikroTik VPN Server O‘rnatish

VPN orqali bog‘lanish DDNS’dan ko‘ra xavfsizroq hisoblanadi.

3.1. L2TP/IPsec VPN sozlash

  1. PPP bo‘limiga kiring.
  2. “Profiles” bo‘limiga o‘ting va “Add New” tugmasini bosing:
    • Name: VPN_Profile
    • Local Address: 192.168.100.1 (bu MikroTik’ning VPN uchun ajratilgan IP-si)
    • Remote Address: 192.168.100.100-192.168.100.200 (VPN mijozlar uchun IP diapazoni)
    • “Apply” va “OK” tugmalarini bosing.
  3. “Secrets” bo‘limiga o‘ting va “Add New” tugmasini bosing:
    • Name: vpn_user
    • Password: strongpassword
    • Service: l2tp
    • Profile: VPN_Profile
    • “Apply” va “OK” tugmalarini bosing.
  4. L2TP Server’ni yoqish:
    • “PPP” bo‘limida “L2TP Server” tugmasini bosing.
    • “Enable” tugmasini bosing.
    • “Use IPsec” opsiyasini yoqing va “IPsec Secret” maydoniga vpn_secret parolini kiriting.
    • “Apply” va “OK” tugmalarini bosing.
  5. Firewall qoidalarini qo‘shish:
    • IPFirewall → “Filter Rules” bo‘limiga o‘ting va “Add New” tugmasini bosing:
      • Chain: input
      • Protocol: udp
      • Dst. Port: 500, 1701, 4500
      • Action: accept
    • “Apply” va “OK” tugmalarini bosing.

3.2. VPN mijozni sozlash (Windows)

  1. Tarmoq sozlamalariga kiring va “Add a VPN connection” tugmasini bosing.
  2. “VPN Provider” sifatida “Windows (built-in)” ni tanlang.
  3. “Connection Name” ga MikroTik VPN deb nom bering.
  4. “Server Name or Address” maydoniga MikroTik’ning DDNS domenini yozing (masalan, mikrotik.ddns.net).
  5. “VPN Type” sifatida L2TP/IPsec ni tanlang.
  6. “Pre-shared key” maydoniga vpn_secret ni kiriting.
  7. “Username” maydoniga vpn_user va “Password” ga strongpassword ni kiriting.
  8. “Save” tugmasini bosib, “Connect” qiling.

4. Xulosa

Agar statik IP bo‘lmasa, MikroTik’ga masofadan ulanish uchun DDNS yoki VPN ishlatish mumkin. DDNS tez sozlanadi, lekin VPN xavfsizroq..

5 1 ovoz
Article Rating
Obuna boʻling
Xabar berish
guest

0 Comments
Eng avvalgi
Eng yangi Eng ko'p ovoz berilgan
Inline fikr-mulohazalar
Hamma izohlarni ko'rish