Search found 170 matches

by brid.surapol
16 Apr 2026, 00:43
Forum: การใช้งาน PostgreSQL
Topic: pg_basebackup Basic Parameters
Replies: 1
Views: 76

Re: pg_basebackup Basic Parameters

search keywords

Code: Select all

pg_basebackup while write activities on primary db
by brid.surapol
16 Apr 2026, 00:42
Forum: การใช้งาน PostgreSQL
Topic: pg_basebackup Basic Parameters
Replies: 1
Views: 76

pg_basebackup Basic Parameters

Code: Select all

pg_basebackup -h primary_host -p 47140 -D /path/to/backup/dir -v -X stream -P --checkpoint=fast -R
by brid.surapol
31 Mar 2026, 17:10
Forum: การใช้งาน Linux
Topic: Loop Command ด้วย seq
Replies: 0
Views: 3032

Loop Command ด้วย seq

Code: Select all

 seq 100000 | xargs -I{} -- sh -c 'command1; command2; command3; . . .'

Example:

Code: Select all

seq 100000 | xargs -I{} -- sh -c 'echo "Loop {}"; ab -n 100000 -c 1000 http://172.16.22.110/'
by brid.surapol
27 Feb 2026, 09:32
Forum: การใช้งาน Linux
Topic: การติดตั้ง fail2ban
Replies: 1
Views: 9162

Re: การติดตั้ง fail2ban

/etc/ssh/sshd_conf

Code: Select all

PermitRootLogin no
MaxAuthTries 4
restart sshd

Code: Select all

sudo service ssh restart
by brid.surapol
27 Feb 2026, 09:23
Forum: การใช้งาน Linux
Topic: การติดตั้ง fail2ban
Replies: 1
Views: 9162

การติดตั้ง fail2ban

วิธีดู attempt attack หรือ login เข้า sshd

tail -f /var/log/auth.log | grep 'sshd'



sudo apt install fail2ban


ใน /etc/fail2ban
แก้ไขfile jail.conf

bantime = 10m
เป็น
bantime = 2h

findtime = 60m
เป็น
findtime = 30m

maxretry = 5
เป็น
maxretry = 3

port = ssh
เป็น
port = 0:65535


เพิ่ม ...
by brid.surapol
12 Nov 2025, 15:18
Forum: การใช้งาน Linux
Topic: วิธีการเพิ่ม DNS Server อย่างถาวร
Replies: 1
Views: 20842

Re: วิธีการเพิ่ม DNS Server อย่างถาวร

หากใช้ systemd-resolved เช่นใน wsl

Code: Select all

sudo vim /etc/systemd/resolved.conf

Code: Select all

[Resolve]
DNS=8.8.8.8 8.8.4.4
Domains=example.com local.domain
by brid.surapol
12 Jul 2025, 16:52
Forum: การใช้งาน Linux
Topic: Manage routing of multiple gateways and interfaces from a single VM
Replies: 0
Views: 8810

Manage routing of multiple gateways and interfaces from a single VM

https://synaptica.info/en/2021/06/16/ubuntu-20-04-gestire-instradamento-di-piu-gateway-e-interfacce-da-una-singola-vm/


sudo apt install iproute2



sudo vim /etc/iproute2/rt_tables


ใส่ 2 บรรทัดสุดท้าย

800 800
801 801


name: eno1
ip address: 192.168.100.214
network: 192.168.100.0/22 ...
by brid.surapol
23 Feb 2025, 10:34
Forum: การใช้งาน Linux
Topic: วิธี rsync เพื่อทำ backup ข้าม network
Replies: 0
Views: 3997

วิธี rsync เพื่อทำ backup ข้าม network

Code: Select all

rsync -arvz --delete -e 'ssh -p #PORT' #source #user@#destination_ip:#destination_parent
ตัวอย่าง

Code: Select all

rsync -arvz --delete -e 'ssh -p 58038' bpc2 p1admin@192.168.3.5:/home/p1admin/cloud_services/ns_files/nsm_attachedfiles/
ไม่ต้องใช้ argument 'v' หาก run ผ่าน bash script

Go to advanced search