Linux
- Comandos utiles
- Linux firewall security
- Install redis
- Actualizar nombre linux
- Escritorio remoto - VNC
- Install Wekan on linux
- Debian sources.list
- Linux Benchmark
- Instalar OpenVPN en servidor
- Instalar ZSH
- Digital Ocean Tutorials
- Linux - Cron Tabs
Comandos utiles
# iniciar ngrok
./ngrok http 3000
# Hacer usb booteable
sudo dd bs=512K status=progress if=linuxmint-19.1-cinnamon-64bit.iso of=/dev/sdb
# Matar proceso que este utilizando un puerto especifico
sudo kill $(sudo lsof -t -i:9001)
python3 -m http.server
#windows
netstat -ano | findstr :8000
taskkill /PID 684 /F
Linux firewall security
sudo apt-get install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status
sudo ufw reload
sudo ufw disable
#Fail2ban
sudo apt-get update
sudo apt-get install fail2ban
Install redis
sudo apt-get install redis-server
sudo systemctl enable redis-server.service
#test redis-cli
redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379>
Actualizar nombre linux
sudo nano /etc/hostname
sudo nano /etc/hosts
Escritorio remoto - VNC
ssh -XC user@IP-ADDRESS
sudo apt install xauth
sudo systemctl restart sshd
sudo apt install x11-apps
sudo touch /dev/fuse
sudo apt install xfce4 xfce4-goodies gnome-icon-theme
sudo apt-get install tightvncserver
apt-get install xfonts-base
vncserver :1 -geometry 800x600 -depth 24
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
apt --fix-broken install
#-------------
vncserver -kill :1
vncserver :1 -geometry 1000x700 -depth 24
#-
tightvncserver :1
tightvncserver -kill :1
tightvncserver -geometry 1024x768 :1
#---------------- gnome -------------
apt-get install gnome-desktop-environment
apt-get install xfonts-100dpi
apt-get install xfonts-100dpi-transcoded
apt-get install xfonts-75dpi
apt-get install xfonts-75dpi-transcoded
apt-get install xfonts-base
#----------- gnome debian ---------
tasksel install desktop gnome-desktop
tasksel install laptop
systemctl set-default graphical.target
https://my.vps6.net/knowledgebase/52/How-to-Install-VNC-wor-GNOME-on-Debian-VPS.html
Install Wekan on linux
https://github.com/wekan/wekan-snap/wiki/Install
Debian sources.list
deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main
deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main
nano /etc/apt/sources.list
Linux Benchmark
wget -qO- bench.sh | bash
Instalar OpenVPN en servidor
https://www.cyberciti.biz/faq/howto-setup-openvpn-server-on-ubuntu-linux-14-04-or-16-04-lts/
https://github.com/Nyr/openvpn-install
wget https://git.io/vpn -O openvpn-install.sh
# vpn
sudo bash openvpn-install.sh
sudo apt install openvpn
openvpn --config client.ovpn
openvpn --config client.ovpn --auth-user-pass
Instalar ZSH
sudo apt-get install zsh
# oh-my-zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
# zsh por defecto
chsh -s `which zsh`
# reinciar computador
Digital Ocean Tutorials
Linux - Cron Tabs
# Ubuntu cron tab file location:
# /var/spool/cron/crontabs/
# list crontabs
crontab -l
#
sudo service cron reload
sudo /etc/init.d/cron start
sudo /etc/init.d/cron stop
sudo /etc/init.d/cron status