เชียงรายโฟกัสดอทคอม สังคมออนไลน์ของคนเชียงราย ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
วันที่ 17 สิงหาคม 2025, 23:20:42
หน้าแรก ช่วยเหลือ เข้าสู่ระบบ สมัครสมาชิก



  • ข้อมูลหลักเว็บไซต์
  • เชียงรายวันนี้
  • ท่องเที่ยว-โพสรูป
  • ตลาดซื้อขายสินค้า
  • ธุรกิจบริการ
  • บอร์ดกลุ่มชมรม
  • อัพเดทกระทู้ล่าสุด
  • อื่นๆ

ประกาศ !! กรุณาอ่านเพื่อทำความเข้าใจ : https://forums.chiangraifocus.com/index.php?topic=1025412.0

+  เว็บบอร์ด เชียงรายโฟกัสดอทคอม สังคมออนไลน์ของคนเชียงราย
|-+  ตลาดกลางซื้อขายสินค้าออนไลน์
| |-+  คอมพิวเตอร์-สินค้าไอที (ผู้ดูแล: [ตา-รา-บาว], K€nGja1, Art_it, chiohoh, nuifish, >> A.P.COMPUTER <<, Active Oper)
| | |-+  แนะนำการใช้งาน Mikrotik RB450G ฟรีครับ limitbittorrent,hotspot,VPN,Section by ip
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
« หน้าที่แล้ว ต่อไป »
หน้า: [1] พิมพ์
ผู้เขียน แนะนำการใช้งาน Mikrotik RB450G ฟรีครับ limitbittorrent,hotspot,VPN,Section by ip  (อ่าน 610 ครั้ง)
art20069
ชั้นประถม
*
ออฟไลน์ ออฟไลน์

กระทู้: 308


« เมื่อ: วันที่ 30 กรกฎาคม 2014, 13:39:21 »

สวัดดีครับเพื่อนชาวเชียงราย  วันนี้ขอแนะนำการใช้งานอุปกรณ์ firewall ตัวเล็กราคาถูกไว้ใช้งานในบ้านหรือหอพัก







ซึ่งตัวนี้ราคากลาง ๆ คุ้มสำหรับผู้ใช้งานแบบ 10 user  ถึง 50 user ซึ่งผมจะทยอยทำชุดสอนใช้งานจนถึงการ Qos ในระดับควบคุม Section ของการใช้งานของ user เพื่อที่จะควบคุมไปพร้อมกับทรัพยากรณ์ของตัวอุปกรณ์และกำหนด Service ต่างๆในระบบให้ทำงานตามความต้องการของตนเองครับ

ตัวอย่าง การเชื่อมต่อ internet 1 line
###########################
#### Internet  1  Line ####
###########################
# add ether1 for pppoe-out1 befor copy code to therminal
#|/ip address
/ip address add address=192.168.2.1/24 network=192.168.2.0 broadcast=192.168.2.255 interface=ether2 comment="default configuration"
#|/ip firewall mangle
/ip firewall mangle add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-mark=ether1_conn
/ip firewall mangle add chain=output connection-mark=ether1_conn action=mark-routing new-routing-mark=to_ether1
#|/ip route
/ip route add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_ether1 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
#|/ip firewall nat
/ip firewall nat add chain=srcnat out-interface=pppoe-out1 action=masquerade
#| DHCP server is on switch, with address pool 192.168.2.10-192.168.2.200
/ip pool add name=default-dhcp ranges=192.168.2.10-192.168.2.200
/ip dhcp-server add name=default address-pool=default-dhcp interface=ether2 disabled=no
/ip dhcp-server network add address=192.168.2.0/24 gateway=192.168.2.1 dns-server=192.168.2.1 comment="default configuration"
#| DNS
/ip dns set allow-remote-requests=yes
/ip dns static add name=router address=192.168.2.1
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000K max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4

###########################
#### Port Service      ####
###########################
/ip service
set telnet address="" disabled=no port=23
set ftp address="" disabled=no port=21
set www address="" disabled=no port=83
set cctv address="" disabled=no port=82
set ssh address="" disabled=no port=22
set www-ssl address="" certificate=none disabled=no port=443
set api address="" disabled=no port=8728
set winbox address="" disabled=no port=8291

############################
#### Noip / Service MK  ####
############################
/system scheduler
add disabled=no interval=5m2s name=No-ip2 on-event=\
    "/system script run No-ip2\r\
    \n" policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
    start-date=jan/02/1970 start-time=00:10:20
add disabled=no interval=1d name=reboot on-event=reboot policy=reboot \
    start-date=jan/01/2002 start-time=03:45:00

/system script
add name=reboot policy=reboot source="/system reboot"
add name=No-ip2 policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sensitive,api source="# \
    No-IP automatic Dynamic DNS update\r\
    \n\r\
    \n#--------------- Change Values in this section to match your setup -----\
    -------------\r\
    \n\r\
    \n# No-IP User account info\r\
    \n:local noipuser \"art20069@hotmail.com\"\r\
    \n:local noippass \"xxxxxxxx\"\r\
    \n\r\
    \n# Set the hostname or label of network to be updated.\r\
    \n# Hostnames with spaces are unsupported. Replace the value in the quotat\
    ions below with your host names.\r\
    \n# To specify multiple hosts, separate them with commas.\r\
    \n:local noiphost \"xxxxxxx.no-ip.biz\"\r\
    \n\r\
    \n# Change to the name of interface that gets the dynamic IP address\r\
    \n:local inetinterface \"pppoe-out1\"\r\
    \n\r\
    \n#-----------------------------------------------------------------------\
    -------------\r\
    \n# No more changes need\r\
    \n\r\
    \n:global previousIP\r\
    \n\r\
    \n:if ([/interface get \$inetinterface value-name=running]) do={\r\
    \n# Get the current IP on the interface\r\
    \n   :local currentIP [/ip address get [find interface=\"\$inetinterface\"\
    \_disabled=no] address]\r\
    \n\r\
    \n# Strip the net mask off the IP address\r\
    \n   :for i from=( [:len \$currentIP] - 1) to=0 do={\r\
    \n       :if ( [:pick \$currentIP \$i] = \"/\") do={ \r\
    \n           :set currentIP [:pick \$currentIP 0 \$i]\r\
    \n       } \r\
    \n   }\r\
    \n\r\
    \n   :if (\$currentIP != \$previousIP) do={\r\
    \n       :log info \"No-IP: Current IP \$currentIP is not equal to previou\
    s IP, update needed\"\r\
    \n       :set previousIP \$currentIP\r\
    \n\r\
    \n# The update URL. Note the \"\\3F\" is hex for question mark (\?). Requi\
    red since \? is a special character in commands.\r\
    \n       :local url \"http://dynupdate.no-ip.com/nic/update\\3Fmyip=\$curr\
    entIP\"\r\
    \n       :local noiphostarray\r\
    \n       :set noiphostarray [:toarray \$noiphost]\r\
    \n       :foreach host in=\$noiphostarray do={\r\
    \n           :log info \"No-IP: Sending update for \$host\"\r\
    \n           /tool fetch url=(\$url . \"&hostname=\$host\") user=\$noipuse\
    r password=\$noippass mode=http dst-path=(\"no-ip_ddns_update-\" . \$host \
    . \".txt\")\r\
    \n           :log info \"No-IP: Host \$host updated on No-IP with IP \$cur\
    rentIP\"\r\
    \n       }\r\
    \n   }  else={\r\
    \n       :log info \"No-IP: Previous IP \$previousIP is equal to current I\
    P, no update needed\"\r\
    \n   }\r\
    \n} else={\r\
    \n   :log info \"No-IP: \$inetinterface is not currently running, so there\
    fore will not update.\"\r\
    \n}"
##########################
## NAT Forward Port CCTV Port 99 ####
##########################
add action=dst-nat chain=dstnat disabled=no dst-address-type=local dst-port=\
    99 in-interface=pppoe-out1 protocol=tcp to-addresses=192.168.2.99 \
    to-ports=99
add action=dst-nat chain=dstnat disabled=no dst-port=99 in-interface=ether2 \
    protocol=tcp to-addresses=192.168.2.99 to-ports=99

##########################
##   NTP TIME Clint SET                ####
##########################
/system ntp client set enabled=yes mode=unicast primary-ntp=158.108.212.149 secondary-ntp=202.28.18.72
/system clock set time-zone-name=Asia/Bangkok

เดียวผมจะค่อยอธิบายการทำงานและการใช้งานในตัวอุปกรณ์ในการนำไปใช้งานร่วมถึงการกำหนดความเร็วในการ Download  bittorrent ไปพร้อม ๆ กับการใช้งาน Service ต่าง ๆ ให้ใช้งา้นในเวลาเดียวกันได้ โดยผลกระทบของการใช้ง้้าน Bittorrent น้อยที่สุดและการแยกเน็ตกับเกมส์ใน internet  1 Line  โดยการแบ่ง ท่อการใช้งานโดยกำหนดความเร็วของแต่ละท่อตาม internet line ที่ใช้รายเดือนให้เหมาะสมกับแต่ละบุคคลครับ วันนี้เริ่มประมาณนี้ก่อนนะครับ

##  ขอโทษผิดหมวดหมู่ขอ Admin ลบให้หน่อยนะครับ ขอบคุณครับ ###

ผมย้ายไป หมวด " คุยเรื่องไอที "
« แก้ไขครั้งสุดท้าย: วันที่ 30 กรกฎาคม 2014, 14:12:45 โดย art20069 » IP : บันทึกการเข้า
หน้า: [1] พิมพ์ 
« หน้าที่แล้ว ต่อไป »
กระโดดไป:  


เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

 
เรื่องที่น่าสนใจ
 

ข้อความที่ท่านได้อ่านบนกระดานข่าวแห่งนี้ เกิดขึ้นจากการเขียนโดยสาธารณชน และตีพิมพ์แบบอัตโนมัติ ผู้ดูแลเว็บไซต์แห่งนี้ไม่จำเป็นต้องเห็นด้วย
และไม่รับผิดชอบต่อข้อความใดๆ ผู้อ่านจึงต้องใช้วิจารณญาณในการกลั่นกรองด้วยตัวเอง และถ้าท่านพบเห็นข้อความใดๆ ที่ขัดต่อกฎหมาย และศีลธรรม พาดพิง ละเมิดสิทธิบุคคอื่น ต้องการแจ้งลบ
กรุณาส่งลิงค์มาที่
เพื่อทีมงานจะได้ดำเนินการลบออกให้ทันที..."

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2013, Simple Machines
www.chiangraifocus.com

Valid XHTML 1.0! Valid CSS!