make copernicus accessable via netbox wg connection
This commit is contained in:
parent
1bf806d4a9
commit
b5e636b4d7
@ -7,6 +7,20 @@
|
|||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
};
|
};
|
||||||
|
listenAddresses = [
|
||||||
|
{
|
||||||
|
addr = "192.168.1.201";
|
||||||
|
port = 2222;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
addr = "10.100.0.2";
|
||||||
|
port = 2222;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.interfaces.eno1 = {
|
||||||
|
allowedTCPPorts = [ 2222 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.usr.openssh.authorizedKeys.keys = [
|
users.users.usr.openssh.authorizedKeys.keys = [
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, config, pkgs, machines, ... }:
|
{ pkgs, machines, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
@ -6,6 +6,7 @@
|
|||||||
ports = [55555];
|
ports = [55555];
|
||||||
settings = {
|
settings = {
|
||||||
X11Forwarding = false;
|
X11Forwarding = false;
|
||||||
|
AllowTcpForwarding = true;
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
};
|
};
|
||||||
@ -34,7 +35,6 @@
|
|||||||
login_ip="''${SSH_CLIENT%% *}"
|
login_ip="''${SSH_CLIENT%% *}"
|
||||||
is_in_ignored=$(grep "$login_ip" /etc/ssh/ignored_ips -c)
|
is_in_ignored=$(grep "$login_ip" /etc/ssh/ignored_ips -c)
|
||||||
if [ "$is_in_ignored" -gt 0 ]; then
|
if [ "$is_in_ignored" -gt 0 ]; then
|
||||||
echo "Your login has been ignored based on your IP address."
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
time=$(date "+%T%:z")
|
time=$(date "+%T%:z")
|
||||||
|
@ -2,3 +2,13 @@ Host netbox
|
|||||||
HostName beepboop.systems
|
HostName beepboop.systems
|
||||||
User ryan
|
User ryan
|
||||||
Port 443
|
Port 443
|
||||||
|
|
||||||
|
Host copernicus-proxy
|
||||||
|
HostName 10.100.0.2
|
||||||
|
User usr
|
||||||
|
Port 2222
|
||||||
|
ProxyJump netbox
|
||||||
|
|
||||||
|
Host copernicus
|
||||||
|
User usr
|
||||||
|
Port 2222
|
||||||
|
Loading…
Reference in New Issue
Block a user