28 ธ.ค. 2559

26 ธ.ค. 2559

14 ธ.ค. 2559

Windows 7 - BOOTMGR is missing

1.บูตจาก Windows 7 DVD
2.ตรงที่มันให้เลือกภาษา ก็กด Shift+F10 จะมีหน้าต่าง cmd ขึ้นมา
3.พิมพ์คำสั่งว่า     bcdboot c:\windows /s c:4.เสร็จแล้ว บูตจากฮาร์ดดิสก์

23 ต.ค. 2559

วิธี bypass squid3

วิธีการ คือ ให้เรากำหนด ระบบ iptables เพิ่มเต็มให้มัน ในส่วนของกรณี ให้มัน ACCEPT IP dns ที่เราต้องการจะให้มันผ่าน ส่วนของ Squid ไปเลยครับ โดย อาจจะเพิ่มเต็มว่า

กรณี เดิมคือ

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

เราจะต้องรู้เป้าหมายเว็บของเราก่อนว่า มี ip เป็นอะไรนะครับ  จากนั้น จัดการตรวจสอบว่า

nslookup hostname  เช่น

nslookup www.sanook.com   มันจะออกมาเป็น ip ให้ทราบครับผม

เช่น ตัวอย่าง

nslookup www.sanook.com

Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   www.sanook.com
Address: 203.107.165.221

เรารู้แล้วว่ามี ip 203.107.165.221

เราก็จัดการนำไปใส่ เอาไว้ ว่า


iptables -t nat -I PREROUTING -d 203.107.165.221 -j ACCEPT

ระบบนี้มันจะ บอกว่า สำหรับเว้บ www.sanook.com ไม่ต้องให้มีการเก็บ Cache ครับ
สามารถ นำไป ขยาย ความเป็น Script แบบง่าย ๆได้ดังนี้

พิมพ์  ว่า

nano /root/bypass_squid.sh

แล้ว พิมพ์ เข้าไปดังด้านล่างนี้ ว่า

#!/bin/bash
# Genarate PF-internet
ip_bypass=nslookup $1 | grep Addre | grep -v "#53" | cut -d " " -f 2
iptables -t nat -I PREROUTING -d $ip_bypass -j ACCEPT


จากนั้น ทำการ Save ครับ แล้วจัดการ


chmod 755 /root/bypass_squid.sh 

แล้ว ทดสอบ ก็ พิมพ์ว่า

/root/bypass_squid.sh www.teenee.com

ดูครับมันจะจัดการใส่ เข้าไปให้ เอง แต่ในกรณีมีหลาย ๆ ip ละทำงั้ยเช่น

nslookup www.google.com
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 64.233.181.147
Name:   www.l.google.com
Address: 64.233.181.106
Name:   www.l.google.com
Address: 64.233.181.105
Name:   www.l.google.com
Address: 64.233.181.104
Name:   www.l.google.com
Address: 64.233.181.103
Name:   www.l.google.com
Address: 64.233.181.99

มีตั้ง 6 ตัว  ทำงั้ยดีทีนี้

อาจจกทำดังต่อไปนี้ครับ
nslookup www.google.com | grep Add | grep -v "#53" > /root/C_bypass
ลอง
cat /root/C_bypass
Address: 64.233.181.99
Address: 64.233.181.147
Address: 64.233.181.106
Address: 64.233.181.105
Address: 64.233.181.104
Address: 64.233.181.103
จะมีข้อมูลดังนี้ จัดการต่อว่า
จัดการต่อว่า
Count=wc -l /root/C_bypass | awk '{print$1}'
for ((zz=1; zz<=$Count; zz++)); do
Count=`cat /root/C_bypass | cut -d " " -f 2 | head -n 1`
iptables -t nat -I PREROUTING -d $Count -j ACCEPT
sed -i '/'$Count'/d' /root/C_bypass
done
ก็จะสามารถใช้งานแบบง่ายๆ ได้ครบทุกตัวแล้วครับ แล้วครับ
จัดการสร้างไฟล์ว่า
nano /root/gen_bypass.sh
ใส่ ข้อมูลไปว่า
#!/bin/bash
# Genarate By PF-internet
nslookup $1 | grep Add | grep -v "#53" > /root/C_bypass
Count=wc -l /root/C_bypass | awk '{print$1}'
for ((zz=1; zz<=$Count; zz++)); do
Count=`cat /root/C_bypass | cut -d " " -f 2 | head -n 1`
iptables -t nat -I PREROUTING -d $Count -j ACCEPT
sed -i '/'$Count'/d' /root/C_bypass
done
ทำการ Save และ ออก
จากนั้น
chmod 755 /root/gen_bypass.sh
ทดสอบ
/root/gen_bypass.sh www.google.com 
ครับผม น่าจะช่วยให้ท่านทำได้ บ้างนะครับ
Credit : webddgame  http://www.3poe.com

Linux Compatible

Microsoft office=Libreoffice
Microsift Edge= Firefox, Google Chrome
Windows media player, MPC-HC = VLC, SMPlayer
Winamp = Audacious, Clementine Rhythmbox, Banshee, amaroK
CCleaner = Bleachbit 
AVG, Avast, Avira, Bitdefender, Kaspersky, Norton = 
uTorrent, Bittorrent = Deluge, Transmission, qBittorent 
Microsoft Paint = Pinta, Mypaint
Window Movie Maker = Openshot
Bandicam, Fraps = Open Broadcasting Software, Simple Screen Recorder
Notepad ++ = Sublime Tex, Atom, Vim, gedit
Winrar = 7zip
Snipping Tool = Shutter
Evernote = Nixnote
DAEMON tools = AcetoneISO 
PowerISO, Nero Burning ROM = Brasero, K3b
ACDSee = Shotwell, gThumb, Gwenview, digiKam
Bitlocker = Gnome Disk Utility, Cryptkeeper
Adobe Acrobat = Okula, Evince
Adobe Photoshop = Gimp, Krita
Adobe Lightroom = Darktable, Rawtherapee
Adobe Illustrator = Inkscape
Adobe Premiere Pro, Sony Vegas Pro = Cinelerra, Kdenlive
Adobe Audition, Ableton Live = Ardour, LMMS, Audacity, Ocenaudio
Adobe After Effect, Nuke = Natron
Adobe Flash = Gnash
Autodesk 3D Max, Maya (Linux compatible) = Blender 
Autodesk Autocad = FreeCAD, LibreCAD
Vmware = VirtualBox
Ghost = Clonezilla
Norton Partition Magic = GParted
DX11, DX12 = OpenGL, Vulkan

14 ต.ค. 2559

How to Turn On or Off Windows Defender in Windows 10

  • Option One: To Turn On or Off Windows Defender using Group Policy
  • Run gpedit.msc --> Computer Configuration/Administrative Templates/Windows Components/Windows Defender
  • In the right pane of Windows Defender in Local Group Policy Editor, double click/tap on the Turn off Windows Defender policy to edit it. Not Configured is the default setting.
  • Option Two: To Turn On or Off Windows Defender using a REG file
  • Run regedit -->HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
  • DisableAntiSpyware DWORD
  • (delete) = On
    1 = Off

25 ก.ย. 2559

backup linux

ssh-keygen -t rsa -b 2048 -v
ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.200.1:~/.ssh/id_rsa.pub
ssh -i ~/.ssh/id_rsa root@192.168.200.1
rsync -avz -e "ssh -i ~/.ssh/id_rsa"  /home/singnarin/ root@192.168.200.1:/backup
scp -i /root/.ssh/id_rsa -r /backup/ root@192.168.200.1:/backup/2021431323/

3 พ.ค. 2559

Mikrotik Firewall Script

ยอมให้มีการใช้ icmp


โค๊ด:
/ip firewall filter
add chain=icmp protocol=icmp icmp-options=0:0 action=accept \ comment="echo reply" 
add chain=icmp protocol=icmp icmp-options=3:0 action=accept \ comment="net unreachable" 
add chain=icmp protocol=icmp icmp-options=3:1 action=accept \ comment="host unreachable" 
add chain=icmp protocol=icmp icmp-options=4:0 action=accept \ comment="allow source quench" 
add chain=icmp protocol=icmp icmp-options=8:0 action=accept \ comment="allow echo request" 
add chain=icmp protocol=icmp icmp-options=11:0 action=accept \ comment="allow time exceed" 

Set IPTABLES

เปิดการใช้งาน IP Forward ป้องกัน Syn Flood และ อนุญาติให้มีการใช้งานแบบ Dynamic IP (ต่อเนต DSL ทั่วไป)
[root@Lab]#echo 1 > /proc/sys/net/ipv4/ip_forward
[root@Lab]#echo 1 > /proc/sys/net/ipv4/tcp_syncookies
[root@Lab]#echo 1 > /proc/sys/net/ipv4/ip_dynaddr

20 มี.ค. 2559

วิธีใช้งานปุ่ม Stop/Reset ของ Printer Canon MP237

วิธีใช้งานปุ่ม Stop/Reset ของ Printer Canon MP237

วิธีกดใช้งาน ปุ่ม STOP / RESET หน้าเครื่อง ปริ้นเตอร์ Canon รุ่น MP237
***ให้กด ปุ่ม STOP/
RESET ค้างไว้ จนมีไฟกระพริบที่ รูปสามเหลี่ยมที่มีรูปสายฟ้าอยู่ข้างใ

กระพริบ 1 ครั้ง สั่งทำการพิมพ์ทดสอบหัวพิมพ์
กระพริบ 2 ครั้ง สั่งล้างหัวพิมพ์แบบธรรมดา
กระพริบ 3 ครั้ง สั่งล้างหัวพิมพ์แบบละเอียด
กระพริบ 4 ครั้ง สั่งทำการพิมพ์ DEMO
กระพริบ 5 ครั้ง สั่งทำการเข้า Service Mode
กระพริบ 6 ครั้ง การจัดตำแหน่งหัวพิมพ์
กระพริบ 7 ครั้ง สั่งทำความสะอาด Roller
กระพริบ 8 ครั้ง สั่งทำความสะอาดแผ่นรองด้านล่าง

7 มี.ค. 2559

Use MBR disk in ESXi 5

1 Make a clean hard disk for ESXi. You can use any method to delete all partitions on that disk.
2 Boot with ESXi CD. During initial installation step, press Shift-O (letter, not number zero) when prompted (right down corner).
3 Type a space and “formatwithmbr” (without quotation marks). Press enter.
4 Go on setup. ESXi will make the target disk prepared with MBR-based partitions instead of GPT.

4 มี.ค. 2559

XenServer 6: Disable GPT and get a larger root partition

1.When the installer initially boots, press F2 to access the advanced installation options.
2.Type shell and press enter. The installer should begin booting into a pre-installation shell where you can make your adjustments.
3.Once you’ve booted into the pre-installation shell, type vi /opt/xensource/installer/constants.py and press enter.
4.Change GPT_SUPPORT = True to GPT_SUPPORT = False to disable GPT and use MBR partition tables. Adjust the value of root_size from 4096 (the default) to a larger number to get a bigger root partition. The size is specified in MB, so 4096 is 4GB. Save the file and exit vim.
5.Type exit and the installer should start.

22 ก.พ. 2559

OEM Information Editor on Windows

1. Click Start -> Search Box to box, type Regedit -> Enter.

2. Enter key in the registry as follows.
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ OEMInformation].

3. Edit the following values as needed.
"Model" = ""
"Logo" = "C: \\ WINDOWS \\ SYSTEM32 \\ OEMLOGO.BMP".
"SupportHours" = "24 Hours a day, 7 days a week".
"Manufacturer" = "Singnarin.net".
"SupportPhone" = "08-1950-72xx".
"SupportURL" = "http://www.singnarin.net/".


Note. Figure it out into the OEM Information to file a bitmap using the extension. BMP only and width 120 × 120 Pixel, but which we can change the address of the directory to store the new one.