วันศุกร์ที่ 12 กรกฎาคม พ.ศ. 2556

Forword Port DotA Mikrotik

/ip firewall nat
add action=dst-nat chain=dstnat comment="#FW Dota" disabled=no dst-address=172.0.0.1 dst-address-type=local dst-port=7101 protocol=tcp to-addresses=192.168.0.230 to-ports=7101
add chain=srcnat out-interface=ether3-dmz src-address=192.168.0.0/24 dst-address=192.168.0.0/24 action=src-nat to-addresses=172.0.0.1 to-ports=7101 comment="#autoDota" disabled=no




/system script (ต้องเข้าไป Add เอง)
:local addr [/ip address get [/ip address find interface=pppoe-out1] address]
/ip firewall nat set [/ip firewall nat find comment="#FW Dota"] dst-address=[:pick $addr 0 ([:len $addr]-3)

]
/ip firewall nat set [/ip firewall nat find comment="#autoDota"] to-addresses=[:pick $addr 0 ([:len $addr]-3)

]
/ip firewall mangle set [/ip firewall mangle find comment="#DotA Route"] dst-address=[:pick $addr 0 ([:len $addr]-3)

]


/system scheduler
add comment="" disabled=no interval=1h name=DotA on-event="/system script run dotaScript" policy=\
reboot,read,write,policy,test,password,sniff,sensitive start-date=may/10/2011 start-time=12:00:00


172.0.0.1 IP public ตาม dns


* บันทัดที่ 2  กำหนดให้เครื่อง IpAddress สามารถ คีย์ Dota ได้ โดยผ่าน Port 7101 (ต้องไป set port ใน dota ด้วย)
* บันทัดที่ 3  กำหนดให้ IP Public forword port ไปที่ 7101 โดยให้ AutoDota รัน Ip Public อัตโนมัติ เพื่อให้สอดคล้องกับ Ip Public ของบันทัดที่ 2
* script ให้มันรัน ip public อัตโนมัติทุกๆ 10 นาที ทั้ง บันทัดที่ 2 และ 3

ไม่มีความคิดเห็น:

แสดงความคิดเห็น