แสดงกระทู้

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - golfreeze

Pages: 1 ... 5 6 [7] 8 9 ... 146
91
วิธีขาย Firo 1000XZC เลิก Burn ทำยังไงบ้าง

ไปที่ wallet ของท่านเอง
Settings -> Options -> Wallet -> Enable coin control features Enable it, then go to Send
-> Inputs
Find your 1000 xzc transaction.
Right-click on it and choose Unlock unspent
 ;)

92
===== firo No funds at specified address (code -32603) how to fixed =====
No funds at specified address (code -32603)
เนื่องจาก wallet มีการย้ายตำแหน่งเมื่อทำการ โอน firo ออกจาก wallet ทำให้เหรียญตำแหน่งเคลื่อน ทำการเชคใหม่ เป็น
 
===generate new
listaddressbalances 0.01
and get line3 value to input as "feeSourceAddress”

protx update_service proTxHash ipAndPort operatorKey (operatorPayoutAddress feeSourceAddress)

93
==== pacemaker alert notification email to
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/configuring_the_red_hat_high_availability_add-on_with_pacemaker/s1-eventnotification-haar

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/high_availability_add-on_reference/ch-alertscripts-haar

Pacemaker provides several sample alert agents, which are installed in /usr/share/pacemaker/alerts by default. These sample scripts may be copied and used as is, or they may be used as templates to be edited to suit your purposes. Refer to the source code of the sample agents for the full set of attributes they support. See Section 13.1.1, “Using the Sample Alert Agents” for an example of a basic procedure for configuring an alert that uses a sample alert agent.
General information on configuring and administering alert agents is provided in Section 13.1.2, “Alert Creation”, Section 13.1.3, “Displaying, Modifying, and Removing Alerts”, Section 13.1.4, “Alert Recipients”, Section 13.1.5, “Alert Meta Options”, and Section 13.1.6, “Alert Configuration Command Examples”.
You can write your own alert agents for a Pacemaker alert to call. For information on writing alert agents, see Section 13.1.7, “Writing an Alert Agent”.

==== Run on server only 1 node is ok [ if ha on 2 nodes] 
# install --mode=0755 /usr/share/pacemaker/alerts/alert_smtp.sh.sample /var/lib/pacemaker/alert_smtp.sh
# pcs alert create id=smtp_alert path=/var/lib/pacemaker/alert_smtp.sh options email_sender=donotreply@packetlove.com
# pcs alert recipient add smtp_alert value=alert@packetlove.com
# pcs alert
Alerts:
 Alert: smtp_alert (path=/var/lib/pacemaker/alert_smtp.sh)
  Options: email_sender=donotreply@example.com
  Recipients:
   Recipient: smtp_alert-recipient (value=admin@example.com)

94
==== setup snmpd for Centos 8 , Centos7
https://kifarunix.com/install-and-configure-snmp-ubuntu-18-04-and-centos-7/

===Let request point snmpd server to 103.131.22.33
Community name: packetlovehaha

==Client
103.119.22.10:199 tcp
103.119.22.11:199 tcp
103.119.22.12:199 tcp

##Install by
yum install net-snmp net-snmp-utils
systemctl enable snmpd
systemctl restart snmpd

vi /etc/snmp/snmpd.conf
rocommunity packetlovehaha 103.131.22.33
systemctl restart snmpd

===configure listen interface all for snmpd tcp 199
cd /lib/systemd/system
cp /lib/systemd/system/snmpd.service /lib/systemd/system/snmpd.service.bak
==change with vi snmpd.service
ExecStart=/usr/sbin/snmpd $OPTIONS -f tcp:127.0.0.1:199 tcp:103.119.22.10.199

===reload and restart snmpd
systemctl daemon-reload
systemctl restart snmpd

==Check Will show listen 199 on
netstat -tnlp
127.0.0.1:199
103.119.22.10.199

95
ถ้าทำตามขั้นตอนด้านบนไม่ได้แล้วให้ใช้วิธีการตามนี้ครับ

cd /usr/local/directadmin/data/users/username/php
vi php-fpm70.conf
php_admin_value[memory_limit] = 300M

systemctl restart php-fpm70
 8)

96
=== Fixed sending slow problem on dovecot and exim on directadmin
issue: delay around 20second when sending email via webmail roundcube

===== /etc/dovecot/conf/lmtp.conf
# LMTP socket for local delivery from exim
service lmtp {
  executable = lmtp -L
  process_min_avail = 32
  unix_listener lmtp-client {
    user = mail
    group = mail
    mode = 0660
  }
}


===== /etc/dovecot/dovecot.conf
service imap-login {
  process_min_avail = 32
  user = dovecot
}
service pop3-login {
  process_min_avail = 32
  user = dovecot
}

==Increase process_min_avail from 16 -> 32 on both configure file then restart service
systemctl restart dovecot
test send email and use 1 sec for sending process
: )

97
All Security via cyber space relate golfreeze task. / shodan.io
« on: มีนาคม 22, 2021, 08:25:06 PM »
http.title:BIG-IP&reg:-Redirect& country:"TH" city:"Bangkok"

98
ถ้าเป็นค่าย AMD ของ Radeon ก็สามารถติดตั้งเป็น .tar.gz ได้นะครับผม โหลดจากลิ้งด้านล่าง
https://www.amd.com/en/support/previous-drivers/graphics/amd-radeon-5500-series/amd-radeon-rx-5500-series/amd-radeon-rx-5500-xt

https://drivers.amd.com/drivers/linux/amdgpu-pro-20.40-1147286-ubuntu-20.04.tar.xz

99
All Security via cyber space relate golfreeze task. / Re: malware decoder php
« on: กุมภาพันธ์ 26, 2021, 11:16:06 PM »
ยกตัวอย่าง ของ malware encode php
\057ho\155e/\157ne\0622/\144om\141in\163/o\156e2\062.c\157m/\160ub\154ic\137ht\155l/\150ot\145la\156dr\145so\162t/\167p-\151nc\154ud\145s/

100
ถ้าในกรณีเข้า ssh ผ่านมือถือ ขนาดหน้าจอของ tmux จะเป็น [41x30]
ถ้าจะกลับมาเข้าผ่าน mac terminal ให้มาเป็นขนาดปกติ ก็
เพื่อเป็นการเข้าไป tmux และทำการ detach ออกจาก sessionของ client อื่นๆด้วย

#tmux a -d

คุณก็จะกลับมาที่ tmux ขนาดหน้าจอปกติ ประมาณ [181x53] ครับผม

 8)

101
เกี่ยวกับ zcoin cryptocurrency / The amount exceeds your balance on firo transfer
« on: กุมภาพันธ์ 18, 2021, 11:51:59 AM »
==The new wallet defaults to Sending your private balance that were anonymised with the Lelantus protocol.
This can cause the "The amount exceeds your balance" error to appear if you try to send your non-anonymised balance.

Click on the 'Use Transparent Balance' on the bottom right of the Send tab to switch to your non-private balance. You should now be able to send them out.


https://firo.org/guide/firo-migration-guide.html
 8)
Thank you Lelantus for secured : )

102
all application on unix knowledges by golfreeze / upgrade centos 6 to centos7 during year 2021
« on: กุมภาพันธ์ 15, 2021, 05:39:21 PM »
upgrade centos 6 to centos7 during year 2021
ผมเชื่อว่ายังมีคนที่ อัฟเกรด kernel สำหรับ centos 6 ไป centos 7 ไม่ทันช่วงที่ Centos 6 ประกาศ EOF เมื่อเดือน Nov2020 ที่ผ่านมา
ซึ่งทำให้ คนที่ใช้ centos 6 (kernel 2.6.x) อยู่ จะไม่สามารถอัฟเดท package ผ่าน yum ได้ อาจจะต้อง compile source เอา และหาพวก package dependency มาติดตั้งก่อน

ซึ่งในวันนี้ทางทีมงาน Packetlove.com เองอยากมาแนะนำ วิธีการครับ อันดับแรก ต้องทำการ backup system เอาไว้ก่อนทำการอัฟเกรด นะครับ
ถ้า backup system เสร็จแล้วก็ ลุยกันเลย

==clear CentOS-base.repo
cd /etc/yum.repo
mv CentOS-base.repo CentOS-base.repo.ori

==vi /etc/yum.repo/CentOS-upgrade.repo
[centos-upgrade]
name=centos-upgrade
baseurl=https://buildlogs.centos.org/centos/6/upg/x86_64/
enabled=1
gpgcheck=0


======== if found error please complete install before
No package libxml2-devel available.
No package libxslt-devel available.
No package openscap, available.
No package pcre-devel available.
No package mod_wsgi available.

==ผมรวบรวมไฟล์ที่จำเป็นในการอัฟเกรดมาให้นะครับ ทำการ download และรัน Fixed ตามด้านล่างได้เลยครับ
wget https://golfreeze.packetlove.com/download/package_upgrade_need.tar.gz
rpm -ivh libgpg-error-devel-1.7-4.el6.x86_64.rpm
rpm -ivh libgcrypt-devel-1.4.5-12.el6_8.x86_64.rpm                                                                                               
rpm -ivh libxml2-devel-2.7.6-21.el6_8.1.x86_64.rpm
rpm -ivh libxml2-2.7.6-21.el6_8.1.src.rpm
rpm -ivh libxslt-devel-1.1.26-2.el6_3.1.x86_64.rpm
rpm -ivh pcre-devel-7.8-7.el6.x86_64.rpm
rpm -ivh mod_wsgi-3.4-1.el6.rfx.x86_64.rpm

===need to use openscap on version 1.0.8
yum install openscap
yum -y install redhat-upgrade-tool preupgrade-assistant-*
yum -y install preupgrade-assistant-contents redhat-upgrade-tool preupgrade-assistant
rpm --import http://mirror.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7


mkdir -pv /var/tmp/system-upgrade/base/ /var/tmp/system-upgrade/extras/ /var/tmp/system-upgrade/updates/
echo http://mirror.centos.org/centos/7/os/x86_64/ >> /var/tmp/system-upgrade/base/mirrorlist.txt
echo http://mirror.centos.org/centos/7/extras/x86_64/ >>   /var/tmp/system-upgrade/base/mirrorlist.txt
echo http://mirror.centos.org/centos/7/updates/x86_64/ >>  /var/tmp/system-upgrade/base/mirrorlist.txt

===start
yes | preupg -v

==new version
centos-upgrade-tool-cli --network=7 --instrepo=http://vault.centos.org/7.2.1511/os/x86_64/
centos-upgrade-tool-cli --force --network=7 --instrepo=https://vault.centos.org/7.2.1511/os/x86_64/ --cleanup-post


==old version
centos-upgrade-tool-cli --network=7 --instrepo=http://vault.centos.org/7.0.1406/os/x86_64/
centos-upgrade-tool-cli --force --network=7 --instrepo=https://vault.centos.org/7.0.1406/os/x86_64/ --cleanup-post


==reboot and waiting 5-10minute please monitoring on console
===ตรงจุดนี้หลังการ ก่อนการรัน reboot เราสามารถเขียน shell script แล้วรันบน crontab ได้นะครับผม
===เพื่อให้ libsasl2 ที่ใช้งานร่วมกับ openssh version บน centos6 สามารถเรียกใช้งานบน centos7 ได้ครับผม


=== script ===
vi ln_shell.sh

#!/bin/bash

export PATH=/usr/sbin:/sbin:/usr/bin:/bin
ln -s /lib64/libpcre.so.1 /lib64/libpcre.so.0
ln -s /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2
systemctl restart sshd

แล้วตั้งใน crontab เป็น
@reboot  /root/ln_shell.sh > /dev/null 2>&1

เท่านี้เราก็พร้อมทำการ reboot ละครับ
reboot

ถ้าใครไม่รัน crontab ก็ต้องรันหน้าเครื่อง console ตามนี้นะครับ
ln -s /lib64/libpcre.so.1 /lib64/libpcre.so.0
ln -s /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2
systemctl restart sshd

ก็จะสามารถ login ผ่าน ssh ได้ครับผม  8)
welcome to Centos7.x kub

หลังจากอัฟเกรดเสร็จแล้วอาจจะต้องแก้ไขปัญหาพวก service ที่ยังรันไม่ได้ให้ทำงานได้นะครับ
ซึ่งในส่วนนี้จะต้องไล่เชค log error แล้วตามแก้ไขเอา ขอให้ทุกท่านผ่านไปได้ด้วยดีนะครับ
: )

103
ถ้าในกรณีใช้งานเป็น ldapsearch บน openldap 2.4.4 แล้วจะให้ search ออกมาเกิน limit ที่ตั้งไว้ 
เราสามารถใช้ "-E pr=1000/noprompt -x" ไปด้วยครับดังนี้

ldapsearch -E pr=1000/noprompt -x

 8)

104
command , shell script ,tool , crontab / Re: basic command for xargs
« on: กุมภาพันธ์ 03, 2021, 07:23:16 PM »
มีโจทย์อยู่ว่า มีชื่อไฟล์ดังนี้

domain1_215sati.php
domain2_215sati.php
domain3_215sati.php
.
.
domain50_215sati.php

ต้องการเปลี่ยนชื่อไฟล์เป็น
domain1_99packetlove.php
domain2_99packetlove.php
domain3_99packetlove.php
.
.
domain50_99packetlove.php

ถ้ามีเวลาเราก็นั่ง mv ทีละไฟล์ได้ แต่ถ้าเวลาน้อยก็นี่เลย 1 command
ls -alh | grep 215sati | awk '{print $9}' | grep \.php$ | sed 'p;s/215sati.php/99packetlove.php/' | xargs -n2 mv

เท่านี้ก็เสร็จภายใน 2 วินาที ครับ  8)

105
=== compile make on centos 8.3 จะเจอ error นี้ครับ เกิดจาก lib ที่ใช้งานใน 2.1.1 เก่าเกินให้ทำการแก้ไขโดย download v.2.3.3 มา compile แทนนะครับ
===wget http://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz

make[3]: Entering directory '/home/golf/nagios_nrpe/nagios-plugins-2.1.1/lib'
gcc -DHAVE_CONFIG_H -I. -I..  -DNP_STATE_DIR_PREFIX=\"/usr/local/nagios/var\" -I. -I../gl -I../intl -I../plugins   -g -O2 -MT utils_base.o -MD -MP -MF .deps/utils_base.Tpo -c -o utils_base.o utils_base.c
In file included from ../plugins/common.h:117,
                 from utils_base.c:27:
../gl/getopt.h:198:8: error: redefinition of 'struct option'
 struct option
        ^~~~~~
In file included from /usr/include/getopt.h:36,
                 from ../gl/getopt.h:32,
                 from ../plugins/common.h:117,
                 from utils_base.c:27:
/usr/include/bits/getopt_ext.h:50:8: note: originally defined here
 struct option
        ^~~~~~
In file included from ../plugins/common.h:117,
                 from utils_base.c:27:
../gl/getopt.h:247:12: error: conflicting types for 'getopt_long'
 extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
            ^~~~~~~~~~~
In file included from /usr/include/getopt.h:36,
                 from ../gl/getopt.h:32,
                 from ../plugins/common.h:117,
                 from utils_base.c:27:
/usr/include/bits/getopt_ext.h:66:12: note: previous declaration of 'getopt_long' was here
 extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
            ^~~~~~~~~~~
In file included from ../plugins/common.h:117,
                 from utils_base.c:27:
../gl/getopt.h:251:12: error: conflicting types for 'getopt_long_only'
 extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
            ^~~~~~~~~~~~~~~~
In file included from /usr/include/getopt.h:36,
                 from ../gl/getopt.h:32,
                 from ../plugins/common.h:117,
                 from utils_base.c:27:
/usr/include/bits/getopt_ext.h:70:12: note: previous declaration of 'getopt_long_only' was here
 extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
            ^~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1394: utils_base.o] Error 1
make[3]: Leaving directory '/home/golf/nagios_nrpe/nagios-plugins-2.1.1/lib'
make[2]: *** [Makefile:1427: all-recursive] Error 1
make[2]: Leaving directory '/home/golf/nagios_nrpe/nagios-plugins-2.1.1/lib'
make[1]: *** [Makefile:1418: all-recursive] Error 1
make[1]: Leaving directory '/home/golf/nagios_nrpe/nagios-plugins-2.1.1'
make: *** [Makefile:1341: all] Error 2


=== compile make on centos 8.3 จะเจอ error นี้ครับ เกิดจาก lib ที่ใช้งานใน 2.1.1 เก่าเกินให้ทำการแก้ไขโดย download v.2.3.3 มา compile แทนนะครับ
===wget http://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz
tar zxf nagios-plugins-2.3.3.tar.gz
cd nagios-plugins-2.3.3
useradd nagios
passwd nagios

export LDFLAGS=-ldl
./configure --with-nagios-user=nagios --with-nagios-group=nagios --enable-redhat-pthread-workaround && make && make install
chown nagios.nagios /usr/local/nagios
chown -R nagios.nagios /usr/local/nagios/libexec/

==> ต้องติดตั้ง compat-openssl10 ด้วยนะครับ
yum install compat-openssl10
ln -s /usr/lib64/libnsl.so.2 /usr/lib64/libnsl.so.1
updatedb
แล้วทำการ restart nrpe ดูอีกรอบนะครับ  8)

Pages: 1 ... 5 6 [7] 8 9 ... 146