Skip to content

Commit

Permalink
update ssh and firewall
Browse files Browse the repository at this point in the history
  • Loading branch information
snowme34 committed Jan 26, 2019
1 parent 2194969 commit 9fb20a9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ sudo apt install iptables-persistent # if not installed yet
6. [How To Choose an Effective Firewall Policy to Secure your Servers | DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-choose-an-effective-firewall-policy-to-secure-your-servers)
7. [Basic iptables template for ordinary servers (both IPv4 and IPv6)](https://gist.github.com/jirutka/3742890)

### Few Words about iptables

If you have a large number of IPs to manage, try `ipset` ([ipset - ArchWiki](https://wiki.archlinux.org/index.php/Ipset))

If you still prefer some well-known websites, [here]( https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands#service-ssh) is one.

## `nftables`

Read the man page if you have time:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ sudo systemctl restart sshd
If ever locked out, try the VNC connection (Console Access) on Digital Ocean's website,
the "Access" dashboard for the droplets.

If you want something fancy, you can choose to:

* specify users who can ssh login
* use [Google Authenticator](https://wiki.archlinux.org/index.php/Google_Authenticator) (ArchWiki)!
* port knocking
* send a ICMP packet first then allow the source ip to ssh
* send a tcp packet first to a specific port then open that port as ssh port
* etc.
* port multiplexing

### Add apt source list (optional)

The following commands are only examples.
Expand Down

0 comments on commit 9fb20a9

Please sign in to comment.