Sysnet Board คู่มือ การใช้งานอุปกรณ์ Network

การ Config อุปกรณ์ เครือข่าย Network Device => อุปกรณ์ Mikrotik Router => หัวข้อที่ตั้งโดย: yod เมื่อ วันที่ 25 พฤษภาคม 2011, 01:37:26

ชื่อ: การ Set Dynanic DNS ในกรณีไม่ได้ให้ Mikrotik ออก Internet โดยตรง
โดย: yod เมื่อ วันที่ 25 พฤษภาคม 2011, 01:37:26
สำหรับกรณีที่ใช้ Mikrotik RouterBoard เชื่อมต่อกับ Router Modem อีกทีครับ หรือต่อเข้ากับ gateway ตัวอื่นๆ วิธีนี้จะดีสำหรับเวลาเราจะ Remote เข้ามาตรวจสอบ Mikrotik หรืออุปกรณ์อื่นๆ โดย set forward port ที่ตัว Router Modem ด้วยนะครับ

ใช้ Script DDNS จากด้านล่าง แก้ไขค่า

YourUsername --> UserName ที่สมัครใน DynDNS.org
YourPassword  --> Password ที่สมัครใน DynDNS.org
DynDNSHostName --> ชื่อ Host ที่ตั้งไว้ใน DynDNS.org



# Set needed variables
:local username "YourUsername"
:local password "YourPassword"
:local hostname "DynDNSHostName"

:global dyndnsForce
:global previousIP

# print some debug info
:log info ("UpdateDynDNS: username = $username")
:log info ("UpdateDynDNS: hostname = $hostname")
:log info ("UpdateDynDNS: previousIP = $previousIP")

# get the current IP address from the internet (in case of double-nat)
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "</body>" -1]
:local currentIP [:pick $result $startLoc $endLoc]
:log info "UpdateDynDNS: currentIP = $currentIP"

# Remove the # on next line to force an update every single time - useful for debugging, but you could end up getting blacklisted by DynDNS!
#:set dyndnsForce true

# Determine if dyndns update is needed
# more dyndns updater request details available at http://www.dyndns.com/developers/specs/syntax.html
:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
   :set dyndnsForce false
   :set previousIP $currentIP
   /tool fetch user=$username password=$password mode=http address="members.dyndns.org" src-path="/nic/update?hostname=$hostname&myip=$currentIP" dst-path="/dyndns.txt"
   :local result [/file get dyndns.txt contents]
   :log info ("UpdateDynDNS: Dyndns update needed")
   :log info ("UpdateDynDNS: Dyndns Update Result: ".$result)
   :put ("Dyndns Update Result: ".$result)
} else={
   :log info ("UpdateDynDNS: No dyndns update needed")
}
ชื่อ: Re: การ Set Dynanic DNS ในกรณีไม่ได้ให้ RouterBoard ออก Internet โดยตรง
โดย: nhoke เมื่อ วันที่ 14 มีนาคม 2012, 00:57:59



ถามนิดนึงนะครับ พอดีผมยังเป็นมือใหม่อยู่
สมมติว่า ถ้า RouterBoard ไม่ได้ออก Internet โดยตรง
แต่ว่าออกผ่าน Linksys RV042 ซึ่งสามารถ set Dynamic DNS ได้อยู่แล้ว
ผมยังจำเป็นที่จะต้องมา Set Service DDNS ใน RouterBoard อีกไหมครับ
ถ้าไม่ต้องแล้ว

ไม่ทราบว่า Port ที่จะต้องทำการ Forward มายัง IP ของ RouterBoard ที่จะเอาไว้ใช้
ในการเข้า Winbox.exe คือ Port อะไรเหรอครับ

โหนก
ชื่อ: Re: การ Set Dynanic DNS ในกรณีไม่ได้ให้ RouterBoard ออก Internet โดยตรง
โดย: wong62 เมื่อ วันที่ 14 มีนาคม 2012, 07:56:59
สำหรับ DDNS ถ้าเราทำที่ routerboard อีกก็จะเพิ่มความมั่นใจ แต่ hostname ต้องไม่ซ้ำกันนะครับ ทำ DDNS หลายๆ ค่ายด้วยก็ดี

ไม่ทราบว่า Port ที่จะต้องทำการ Forward มายัง IP ของ RouterBoard ที่จะเอาไว้ใช้
ในการเข้า Winbox.exe คือ Port อะไรเหรอครับ
winbox   port 8291
www     port  81

หรือเข้าไปดูที่  ip-->services
ชื่อ: Re: การ Set Dynanic DNS ในกรณีไม่ได้ให้ RouterBoard ออก Internet โดยตรง
โดย: akthan เมื่อ วันที่ 2 เมษายน 2012, 05:19:37

ถ้าต่อแบบ Bridge mode จาก Modem router  มา Router board จำเป็นต้อง Forward port จาก Modem router มา Router board อีกไหมครับ เพราะ ของผมไม่มีให้ตั้งค่าถ้าอยู่ใน Bridge mode.

AKTHAN
ชื่อ: Re: การ Set Dynanic DNS ในกรณีไม่ได้ให้ RouterBoard ออก Internet โดยตรง
โดย: yod เมื่อ วันที่ 2 เมษายน 2012, 06:03:36


สวัสดีครับ

ไม่ต้อง forward ครับ เพราะมันเป็น bridge อย่างเดียวแล้ว ไม่ได้ทำหน้าที่ nat ครับ
ชื่อ: Re: การ Set Dynanic DNS ในกรณีไม่ได้ให้ RouterBoard ออก Internet โดยตรง
โดย: akthan เมื่อ วันที่ 2 เมษายน 2012, 08:49:14
โอเช แจ่มแจ้งครับ
ชื่อ: Re: การ Set Dynanic DNS ในกรณีไม่ได้ให้ RouterBoard ออก Internet โดยตรง
โดย: denmobile เมื่อ วันที่ 22 กรกฎาคม 2012, 15:41:49
สอบถามหน่อยครับใน กรณีที่เราไม่ให้เล้าเตอร์บอร์ดออกเน็ต แล้วเราไปฟอเวิด ที่ตัวโมเด็ม ไอพีที่จะเข้าหาตัวอุปกรณ์นี้ เราใช้ไอพีอะไรครับ หรือว่าใช้ไอพี ที่เราตั้ง ในวงแรนขาใน ดูๆแล้ว ไอพี ที่เราสร้างมันไม่ตรงกับ โมเด็ม ผมยังงๆอยู่เลย