-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
a0920a6
commit 9b33b03
Showing
13 changed files
with
194 additions
and
406 deletions.
There are no files selected for viewing
Empty file.
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,26 @@ | ||
-- Region | ||
Language : english | ||
Zone : France | ||
Keyboard : American english | ||
-- Admin | ||
Hostname : roger | ||
Domain : 42.fr | ||
Password root : niconico | ||
-- Account non-admin | ||
Full name : nicolasvienot | ||
Username : nvienot | ||
Password : niconico | ||
-- Partition disks | ||
Type : Manual | ||
1st partition : 4.5gb, primary, beggining, ext4, mounted on / | ||
2nd partition : 1gb, primary, beggining, swap | ||
3rd partition : rest, primary, ext4, mounted on /home | ||
-- Package manager | ||
Country : France | ||
Mirror : ftp.fr.debian.org | ||
-- Config | ||
HTTP proxy : no | ||
Software selection : Select [SSH server] [Standard system utilities] | ||
Instal the GRUB boot loader : yes | ||
|
||
DONE |
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,18 @@ | ||
1. Connect to VM with previous login/password | ||
-- su | ||
-- apt-get update && apt-get upgrade | ||
-- apt-get install sudo vim iptables-persistent fail2ban sendmail apache2 | ||
-- adduser X | ||
-- adduser X sudo | ||
-- replace > with own etc/ssh/sshd_config (with password autentification yes) | ||
-- replace > with own etc/network/interface | ||
-- reboot | ||
3. On host (iTerm2) | ||
-- ssh-keygen | ||
-- cat ~/.ssh/id_rsa.pub | ||
-- Save key | ||
-- ssh [USERNAME.VM]@[IP.VM] -p [PORT.SSH.VM] | ||
-- sudo mkdir .ssh | ||
-- sudo vim .ssh/authorized_keys -> paste pub key | ||
-- replace password autentification yes to no on etc/ssh/sshd_config | ||
-- sudo service ssh restart |
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,9 @@ | ||
IPTABLES | ||
|
||
1. Connect to VM with username | ||
2. Add "iptables" in /etc/network/if-pre-up.d/iptables | ||
3. sudo chmod -x /etc/networks/if-pre-up.d/iptables | ||
4. sudo sh /etc/networks/if-pre-up.d/iptables | ||
|
||
FAIL2BAN | ||
|
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,18 @@ | ||
# This file describes the network interfaces available on your system | ||
# and how to activate them. For more information, see interfaces(5). | ||
|
||
source /etc/network/interfaces.d/* | ||
|
||
# The loopback network interface | ||
auto lo | ||
iface lo inet loopback | ||
|
||
# The primary network interface | ||
allow-hotplug enp0s3 | ||
iface enp0s3 inet static | ||
#address/broadcast/gateway need to be changed depending on cluster | ||
#address : choose anything from 10.12.0.0 to 10.12.255.255 | ||
address 10.12.123.123 | ||
netmask 255.255.255.252 | ||
broadcast 10.12.255.255 | ||
gateway 10.12.254.254 |
Empty file.
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,123 @@ | ||
# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ | ||
|
||
# This is the sshd server system-wide configuration file. See | ||
# sshd_config(5) for more information. | ||
|
||
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin | ||
|
||
# The strategy used for options in the default sshd_config shipped with | ||
# OpenSSH is to specify options with their default value where | ||
# possible, but leave them commented. Uncommented options override the | ||
# default value. | ||
|
||
Port 55555 | ||
#AddressFamily any | ||
#ListenAddress 0.0.0.0 | ||
#ListenAddress :: | ||
|
||
#HostKey /etc/ssh/ssh_host_rsa_key | ||
#HostKey /etc/ssh/ssh_host_ecdsa_key | ||
#HostKey /etc/ssh/ssh_host_ed25519_key | ||
|
||
# Ciphers and keying | ||
#RekeyLimit default none | ||
|
||
# Logging | ||
#SyslogFacility AUTH | ||
#LogLevel INFO | ||
|
||
# Authentication: | ||
|
||
#LoginGraceTime 2m | ||
PermitRootLogin no | ||
#StrictModes yes | ||
#MaxAuthTries 6 | ||
#MaxSessions 10 | ||
|
||
PubkeyAuthentication yes | ||
|
||
# Expect .ssh/authorized_keys2 to be disregarded by default in future. | ||
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 | ||
|
||
#AuthorizedPrincipalsFile none | ||
|
||
#AuthorizedKeysCommand none | ||
#AuthorizedKeysCommandUser nobody | ||
|
||
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts | ||
#HostbasedAuthentication no | ||
# Change to yes if you don't trust ~/.ssh/known_hosts for | ||
# HostbasedAuthentication | ||
#IgnoreUserKnownHosts no | ||
# Don't read the user's ~/.rhosts and ~/.shosts files | ||
#IgnoreRhosts yes | ||
|
||
# To disable tunneled clear text passwords, change to no here! | ||
PasswordAuthentication no | ||
#PermitEmptyPasswords no | ||
|
||
# Change to yes to enable challenge-response passwords (beware issues with | ||
# some PAM modules and threads) | ||
ChallengeResponseAuthentication no | ||
|
||
# Kerberos options | ||
#KerberosAuthentication no | ||
#KerberosOrLocalPasswd yes | ||
#KerberosTicketCleanup yes | ||
#KerberosGetAFSToken no | ||
|
||
# GSSAPI options | ||
#GSSAPIAuthentication no | ||
#GSSAPICleanupCredentials yes | ||
#GSSAPIStrictAcceptorCheck yes | ||
#GSSAPIKeyExchange no | ||
|
||
# Set this to 'yes' to enable PAM authentication, account processing, | ||
# and session processing. If this is enabled, PAM authentication will | ||
# be allowed through the ChallengeResponseAuthentication and | ||
# PasswordAuthentication. Depending on your PAM configuration, | ||
# PAM authentication via ChallengeResponseAuthentication may bypass | ||
# the setting of "PermitRootLogin without-password". | ||
# If you just want the PAM account and session checks to run without | ||
# PAM authentication, then enable this but set PasswordAuthentication | ||
# and ChallengeResponseAuthentication to 'no'. | ||
UsePAM yes | ||
|
||
#AllowAgentForwarding yes | ||
#AllowTcpForwarding yes | ||
#GatewayPorts no | ||
X11Forwarding yes | ||
#X11DisplayOffset 10 | ||
#X11UseLocalhost yes | ||
#PermitTTY yes | ||
PrintMotd no | ||
#PrintLastLog yes | ||
#TCPKeepAlive yes | ||
#UseLogin no | ||
#UsePrivilegeSeparation sandbox | ||
#PermitUserEnvironment no | ||
#Compression delayed | ||
#ClientAliveInterval 0 | ||
#ClientAliveCountMax 3 | ||
#UseDNS no | ||
#PidFile /var/run/sshd.pid | ||
#MaxStartups 10:30:100 | ||
#PermitTunnel no | ||
#ChrootDirectory none | ||
#VersionAddendum none | ||
|
||
# no default banner path | ||
#Banner none | ||
|
||
# Allow client to pass locale environment variables | ||
AcceptEnv LANG LC_* | ||
|
||
# override default of no subsystems | ||
Subsystem sftp /usr/lib/openssh/sftp-server | ||
|
||
# Example of overriding settings on a per-user basis | ||
#Match User anoncvs | ||
# X11Forwarding no | ||
# AllowTcpForwarding no | ||
# PermitTTY no | ||
# ForceCommand cvs server |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Submodule SlowLoris
updated
from 000000 to 8aa8bb
Binary file not shown.
Oops, something went wrong.