forked from moul/sshportal
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Package: sshportal | ||
Version: 1.0 | ||
Architecture: amd64 | ||
Maintainer: Alter Way <security@alterway.fr> | ||
Description: SSH bastion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
systemctl daemon-reload | ||
systemctl enable sshportal | ||
systemctl start sshportal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
rm /etc/systemd/system/sshportal.service | ||
systemctl daemon-reload | ||
systemctl reset-failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[Unit] | ||
After=ssh.service | ||
|
||
[Service] | ||
Type=exec | ||
DynamicUser=yes | ||
User=sshportal | ||
#Restart=on-failure | ||
RestartSec=10s | ||
StandardOutput=append:/var/log/sshportal/audit/audit.log | ||
LogsDirectory=sshportal | ||
StateDirectory=sshportal | ||
Environment=SSHPORTAL_LOGS_LOCATION=/var/log/sshportal/session | ||
Environment=SSHPORTAL_DATABASE_URL=/var/lib/sshportal/sshportal.db | ||
ExecStartPre=mkdir -p /var/log/sshportal/audit | ||
ExecStart=/usr/bin/sshportal server | ||
ExecStop=/bin/kill -SIGTERM $MAINPID | ||
|
||
ProtectSystem=full | ||
DevicePolicy=closed | ||
DeviceAllow=/dev/tpm0 | ||
DeviceAllow=/dev/tpmrm0 | ||
ProtectKernelLogs=true | ||
ProtectProc=invisible | ||
PrivateUsers=true | ||
ProtectHome=true | ||
UMask=0077 | ||
RestrictNamespaces=true | ||
LockPersonality=true | ||
NoNewPrivileges=true | ||
ProtectKernelModules=true | ||
SystemCallArchitectures=native | ||
ProtectHostname=true | ||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX | ||
RestrictRealtime=true | ||
ProtectControlGroups=true | ||
ProtectKernelTunables=true | ||
RestrictSUIDSGID=true | ||
ProtectClock=true | ||
SystemCallFilter=@system-service | ||
SystemCallFilter=~@privileged @resources | ||
SystemCallFilter=setrlimit | ||
CapabilityBoundingSet= | ||
MemoryDenyWriteExecute=true | ||
|
||
[Install] | ||
WantedBy=default.target |