forked from pub-solar/infra
ssh: only allow ssh on wireguard interface
This commit is contained in:
parent
f7eaef0d18
commit
b1519c8f22
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, lib, ... }: {
|
||||||
|
# Don't expose SSH via public interfaces
|
||||||
|
networking.firewall.interfaces.wg-ssh.allowedTCPPorts = [ 22 ];
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
openFirewall = lib.mkDefault false;
|
||||||
settings = {
|
settings = {
|
||||||
PermitRootLogin = "prohibit-password";
|
PermitRootLogin = "prohibit-password";
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue