Linux starter guide for ME

Basis CentOS minimum

  • yum upgrade

Vervangen van Firewalld voor Iptables (geen regels mee nemen)

  • sudo yum install iptables-services
  • sudo systemctl stop firewalld
  • sudo systemctl start iptables
  • sudo systemctl start ip6tables
  • sudo systemctl enable iptables
  • sudo systemctl enable ip6tables
  • sudo systemctl disable firewalld
  • sudo systemctl mask firewalld

Howto source

Aanpassen van standaard SSH settings:

  • vi /etc/ssh/sshd_config
    • Poort nummer
      • Port 22522
    • Disable root login
      • PermitRootLogin no
    • Disable X11
      • X11Forwarding no
  •  systemctl restart sshd

Toevoegen van remote SSH toegang:

  • iptables -L
  • vi /etc/sysconfig/iptables
  • Standaard : “-A INPUT -p tcp -m state –state NEW -m tcp –dport 22 -j ACCEPT”
  • specifieker met source IP (vb 192.0.2.1)
    • -A INPUT -p tcp -s 192.0.2.1 -m state –state NEW -m tcp –dport 22522 -j ACCEPT
  • systemctl restart iptables.service
  • iptables -L