Skip to content

Instantly share code, notes, and snippets.

View lubry's full-sized avatar
💭
I may be slow to respond.

Lubriady Oktana lubry

💭
I may be slow to respond.
View GitHub Profile
@lubry
lubry / gist:5f0bb689a3135fe3ac72e7c3d4b2eb31
Created January 6, 2022 05:23 — forked from Khoulaiz/gist:41b387883a208d6e914b
Checking ports without telnet

Here are several different ways to test a TCP port without telnet.

$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C

$ cat &lt; /dev/tcp/127.0.0.1/23
@lubry
lubry / FirewalldRichRule.txt
Created November 19, 2021 07:52
Firewalld Rich Rule
1. Allow IP tertentu di Port tertentu FirewallD
Perintah:
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="<IP ADDRESS/SUBNET>" port protocol="tcp" port="<PORT>" accept'
Contoh:
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="123.123.123.123/32" port protocol="tcp" port="587" accept'
2. Hapus Rule diatas
Perintah:
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="<IP ADDRESS/SUBNET>" port protocol="tcp" port="<PORT>" accept'
@lubry
lubry / Konfigurasi Resolver Ubuntu 20.04.txt
Last active April 8, 2021 09:45
Konfigurasi Permanent Resolver Ubuntu 20.04
Berikut adalah tutorial cara konfigurasi resolver pada Ubuntu 20.04
1. Edit file resolver
# echo "nameserver 1.1.1.1" >> /etc/resolv.conf
2. Jalankan update dalam screen mode
# screen -amS update
3. Dalam mode screen jalankan perintah update
# apt-get update
@lubry
lubry / invalid privatekey.md
Created February 10, 2021 16:48
Error Code in Rundeck when fail to connect SSH using Private Key

Some part resources.xml code

<node name="NODE-NAME" hostname="HOSTNAME" osArch="amd64" osFamily="unix" username="root" ssh-keypath="/var/lib/rundeck/.ssh/id_rsa" ssh-authentication="privateKey"/>

Error Code in Rundeck when fail to connect SSH using Private Key:

Failed: SSHProtocolFailure: invalid privatekey: [B@2f7283d1
Execution failed: 8 in project PROJECT-NAME: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [NODE-NAME: SSHProtocolFailure: invalid privatekey: [B@2f7283d1 + {dataContext=MultiDataContextImpl(map={ContextView(step:1, node:NODE-NAME)=BaseDataContext{{exec={exitCode=-1}}}, ContextView(node:NODE-NAME)=BaseDataContext{{exec={exitCode=-1}}}}, base=null)} ]}, Node failures: {NODE-NAME=[SSHProtocolFailure: invalid privatekey: [B@2f7283d1 + {dataContext=MultiDataContextImpl(map={ContextView(step:1, node:NODE-NAME)=BaseDataContext{{exec={exitCode=-1}}}, ContextView(node:NODE-NAME)=BaseDataContext{{exec={exitCode=-1}}}}, base=null)} ]}, status: failed]
@lubry
lubry / Docker CE in Raspbian 9 (stretch).txt
Created August 6, 2020 15:01
Docker CE in Raspbian 9 (stretch)
root@master:/home/pi# cat /etc/apt/sources.list.d/docker.list
deb [arch=armhf] https://download.docker.com/linux/raspbian stretch edge
root@master:/home/pi# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
@lubry
lubry / How to Configure Docker Private Registry in Jfrog Artifactory.txt
Created October 3, 2019 16:05
How to Configure Docker Private Registry in Jfrog Artifactory
How to Configure Docker Private Registry in Jfrog Artifactory
@lubry
----
###In Jfrog Artifactory Server###
(*)in Jfrog Artifactory Dasboard login as admin.
(*)Create Docker Repostory for Docker
#[Create Repository] > [Quick Setup] > [Docker] > [Create]
(*)Check your docker client.
root@jfrogserver:~# docker info
@lubry
lubry / Create from template for windows server 2012 r2 with edit network.txt
Created October 3, 2019 16:02
Create from template for windows server 2012 r2 with edit network
#Create from template for windows server 2012 r2 with edit network
#by: Lubry
#module used: vsphere_guest
---
- hosts: localhost
connection: local
vars_prompt:
- name: username
prompt: "Enter VMWare ESXi Username "
@lubry
lubry / Create a VM from a template.yml
Created October 3, 2019 15:56
Create a VM from a Template VMWare
---
- name: Create a VM from a template
hosts: vmware-internal
remote_user: root
ansible_password: $password
connection: local
vars:
vcenter_hostname: 10.0.50.49
vcenter_user: root
vcenter_pass: $password
@lubry
lubry / Integrasi Jira dengan Jenkins.txt
Last active October 3, 2019 15:57
Integrasi Jira dengan Jenkins
Integrasi Jira dengan Jenkins
Oleh @lubry
Download MySQL Yum Repository pada halaman (http://dev.mysql.com/downloads/repo/yum/)
###Konfigurasi dan Instalasi Database MySQL untuk kebutuhan Jira###
[*]Install Yum Repository MySQL 5.7
sudo yum localinstall mysql57-community-release-el7-11.noarch.rpm
@lubry
lubry / Requires: erlang 20.3.txt
Created September 24, 2019 02:40
Requires: erlang >= 20.3 CentOS 7
Requires: erlang >= 20.3
vi /etc/yum.repos.d/erlang-solutions.repo
Insert:
[erlang-solutions]
name=CentOS $releasever - $basearch - Erlang Solutions
baseurl=https://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch
gpgcheck=1