Category Archives: Linux

ufw

install : sudo apt install ufw check status : sudo ufw status verbose enable ufw : sudo ufw enable disable ufw : sudo ufw disable allow : sudo ufw allow 8080/tcp allow range : sudo ufw allow 9000:9100/tcp allow spesific address : sudo ufw allow from 192.168.1.234 sudo ufw allow from 192.168.1.234 to any port… Read More »

netcat and port scanning

listen tcp : netcat -l 1234 listen udp : netcat -u -l 1234 connect to another server tcp : netcat 192.168.1.1 1234 connect to another server udp : netcat -u 192.168.1.1 1234 port scanning : netcat -z -n -v 198.168.1.1 1-1000 2>&1 | grep succeeded

source list ubuntu 16

sudo vi /etc/apt/sources.list deb http://kambing.ui.ac.id/ubuntu/ xenial main restricted universe multiverse deb http://kambing.ui.ac.id/ubuntu/ xenial-updates main restricted universe multiverse deb http://kambing.ui.ac.id/ubuntu/ xenial-security main restricted universe multiverse deb http://kambing.ui.ac.id/ubuntu/ xenial-backports main restricted universe multiverse deb http://kambing.ui.ac.id/ubuntu/ xenial-proposed main restricted universe multiverse

ndev add route

auto eth2 iface eth2 inet static address 172.17.21.150 netmask 255.255.255.0 dns-nameserver 8.8.8.8 80.80.80.80 post-up route add -net 172.17.22.0 netmask 255.255.255.0 gw 172.17.21.12 post-up route add -net 172.17.23.0 netmask 255.255.255.0 gw 172.17.21.12

git add user and password

biar nggak bolak balik ngetik password diterminal, add user dan password git. cara gampang tapi kurang aman : cara relatif aman yaitu menggunakan ssh. 1. buka terminal ketik ssh-keygen -t ed25519 -C “email@telo.com” 2. by default keystore tergenerate ke ~/.ssh/id_ed25519.pub, copy string isinya. more ~/.ssh/id_ed25519.pub 3. buka https://gitlab.com/profile/keys, kemudian paste pada bagian key. 4. isi… Read More »

Ubuntu enable tab completion

sudo apt install bash-completion sudo apt install –reinstall bash-completion jika tidak mau mau juga : vi ~/.bashrc # enable bash completion in interactive shells if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi

iptables

# aktifkan port forwading di ubuntu (direstart tidak hilang) # edit file /etc/sysctl.conf # uncomment net.ipv4.ip_forward=1 # apply sudo sysctl -p sudo sysctl –system #list iptables sudo iptables -L sudo iptables -L -v #list iptables NAT sudo iptables -t nat -L sudo iptables -t nat -L -v sudo iptables -t nat -L -v –line-numbers sudo… Read More »