Skip to content

Lionous/server_configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

    👋 Ip addressing and server configuration in ubuntu

DHCP

   sudo apt install isc-dhcp-server

Routes

SSH

sudo apt install openssh-server

Routes

  • Default port: 22
    • cd /etc/ssh/ Perform the configuration in the previous routes...
    • Port change: file "sshd_config"
    sudo systemctl start ssh
    sudo systemctl status ssh

FTP

sudo apt-get install vsftpd

Routes

  • Default port: 21 Perform the configuration in the previous routes...
    • Port change: /etc/vsftpd.conf -> listen_port=21
    sudo gedit /etc/vsftpd.conf
    Init, restart, status...
    sudo init.d/vsftpd restart
    sudo init.d/vsftpd start

APACHE2

   sudo apt install apache2
  • Default port: Listen 80
  • Port change: /etc/apache2/ports.conf

Port configuration and reboot

sudo gedit /etc/apache2/ports.conf

Create or modify an Apache VirtualHost :

sudo gedit /etc/apache2/sites-enabled

Change the port of your preference File: "000-default.conf" or other files "example.conf"

Allow Apache to bind to the new port

sudo systemctl restart apache2
sudo netstat -tlpn| grep apache
sudo ss -tlpn| grep apache

Now, to check that the connection is correct, we will access it from a browser using the following syntax:

http://Direccion_IP:8081

Configuration and status

   sudo systemctl start apache2
   sudo systemctl status apache2
   sudo systemctl stop apache2

Permissions

  • Routes htmls: cd /var/www/html/

Read write and execute for all users (not recommendable)

   sudo chmod 777 /var/www/html/

Read write and execute only for the file owner (recommendable)

   sudo chmod 755 /var/www/html/

For individual files the owner has read write and execute permission

   sudo chmod 664 /var/www/html/index.html

Cration and deletion of users

sudo su

Create new user with "name-user"

adduser name-user

Give administrator permissions

adduser name-user sudo

SSH permisions with an IP

Delete user

 sudo userdel -r name-user

About

Ip addressing and server configuration in ubuntu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published