Skip to content
- SSH
- ssh-keyscan -H 192.168.1.162 >> ~/.ssh/known_hosts (add connection to known hosts to prevent errors with automated connections)
- ssh-keygen
- netstat
- netstat -ltun (list all listening ports for tcp and udp)
- iptables (from https://askubuntu.com/questions/790001/sharing-connection-iptables, also https://stackoverflow.com/questions/28857402/reverse-tethering-of-several-android-devices-via-usb might have some useful info)
- edit /etc/sysctl.conf and uncomment:
- # net.ipv4.ip_forward=1
- And the iptables part should look something like below, where eth0 is internet and eth1 is LAN:
- iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
- iptables -A FORWARD -i eth1 -o eth0 -m state –state RELATED,ESTABLISHED -j ACCEPT
- iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
- If you have 2 physical network interfaces in server then it should work, you cant use your server as internet gateway if it only has 1 physical interface
- ssh dd
- sudo dd if=/dev/mmcblk0 | ssh pi@192.168.200.149 dd of=/media/pi/ext4storage/image.bin
- sudo route -n
- sudo route del -net 0.0.0.0 gw 0.0.0.0 netmask 0.0.0.0 dev vethfea8f6c
- or sudo ip route delete default via 182.18.1.1 dev tun0
- sudo journalctl –lines 1000 –follow
- For managing interfaces directly, without using connman or NetworkManager, edit /etc/network/interfaces like follows:
- # Loopback
- #
- auto lo
- iface lo inet loopback
- # network card
- #
- auto eth0 #enables interface on startup
- iface eth0 inet static
- address 192.168.1.254
- netmask 255.255.255.0
- network 192.168.1.0
- broadcast 192.168.1.255
- gateway 192.168.1.1
- fail2ban
fail2ban-client set <jail-name> unbanip <ip-address>
Click to Copy
Your writing is a reminder that the simplest words can sometimes hold the most profound truths.
Good shout.