Misc. - michael-D-S/SYS-255 GitHub Wiki
Securing SSH
STEPS:
-
sudo nano /etc/ssh/sshd_config
-
Look for the line that says:
PermitRootLogin yes
-
Change it to:
PermitRootLogin no
-
Restart SSH Services
-
Check the status of SSH
Setting a static IP address on CentOS
-
login to the root account
-
use the command
nmtui
-
press enter to edit connections
-
press enter a second time on the device name to edit the connections
-
rename the device as you see fit
-
using the arrow keys navigate to the IPv4 config section and press enter
-
move down to the manual option and press enter
-
move to the right and press enter when the Show is highlighted
-
add in your appropriate address with the netmask at the end
-
add in the other relevant information
10.5 ensure that the automatically connect field is checked
-
navigate down to the OK option at the bottom right corner and press enter
-
navigate down to the back option and press enter
-
navigate to the quit option and press enter, this will bring you back to the command terminal.
Linux permissions
Must be root or equivalent permission.
Create Users:
useradd (User name)
Create Groups:
groupadd (name of group)
Add Group members:
usermod -aG (group) (user to be added)
Adjust rwx directory permission:
chmod u-rwx (director name)
- -r =read
- -w =write
- -x =execute
- g- for groups
- u- for users
- o- for others
Adjust rwx file permission:
chmod ugo-rwx (file path)
DHCP Notes
DHCPDiscover - Looks for a DHCP server
DHCPOffer - The DHCP server offers an address
DHCPRequest - The host requests to lease that address
DHCPACK - DHCP server sends the IP addresses to the host
UDP Ports:
Client: 68
Server:67
Broadcast/Unicast:
Broadcast: Everyone
Unicast: One to one