Misc. - michael-D-S/SYS-255 GitHub Wiki


Securing SSH

STEPS:

  1. sudo nano /etc/ssh/sshd_config

  2. Look for the line that says: PermitRootLogin yes

  3. Change it to: PermitRootLogin no

  4. Restart SSH Services

  5. Check the status of SSH


Setting a static IP address on CentOS

  1. login to the root account

  2. use the command nmtui

  3. press enter to edit connections

  4. press enter a second time on the device name to edit the connections

  5. rename the device as you see fit

  6. using the arrow keys navigate to the IPv4 config section and press enter

  7. move down to the manual option and press enter

  8. move to the right and press enter when the Show is highlighted

  9. add in your appropriate address with the netmask at the end

  10. add in the other relevant information

10.5 ensure that the automatically connect field is checked

  1. navigate down to the OK option at the bottom right corner and press enter

  2. navigate down to the back option and press enter

  3. 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