secure_ubuntu_system:initial_setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
secure_ubuntu_system:initial_setup [2020/05/19 13:32] – peter | secure_ubuntu_system:initial_setup [2022/07/19 10:21] (current) – [Configure the network] 85.203.36.242 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Secure Ubuntu System - First Configuration ====== | ====== Secure Ubuntu System - First Configuration ====== | ||
+ | |||
+ | {{: | ||
===== Login ===== | ===== Login ===== | ||
Line 5: | Line 7: | ||
Login to the newly installed system with your previously created Administrator' | Login to the newly installed system with your previously created Administrator' | ||
+ | ---- | ||
===== Get root privileges (Optional) ===== | ===== Get root privileges (Optional) ===== | ||
Line 16: | Line 19: | ||
...and entering the Administrator' | ...and entering the Administrator' | ||
+ | |||
+ | |||
+ | <WRAP important> | ||
**IMPORTANT**: | **IMPORTANT**: | ||
+ | </ | ||
+ | <WRAP alert> | ||
**DANGER**: | **DANGER**: | ||
Line 41: | Line 49: | ||
</ | </ | ||
+ | |||
+ | </ | ||
---- | ---- | ||
Line 50: | Line 60: | ||
</ | </ | ||
- | This is done for safety. | + | <WRAP info> |
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
===== Configure the network ===== | ===== Configure the network ===== | ||
Line 57: | Line 71: | ||
Because the Ubuntu installer has configured the system to get its network settings via DHCP, we have to change that now because a server should have a static IP address. | Because the Ubuntu installer has configured the system to get its network settings via DHCP, we have to change that now because a server should have a static IP address. | ||
- | Change the following entry **iface eth0 inet dhcp** in the network interfaces file. | + | Change the following entry **iface |
Issue the following command: | Issue the following command: | ||
Line 118: | Line 132: | ||
<WRAP warning> | <WRAP warning> | ||
- | **WARNING**: | + | **WARNING**: |
- | Traditionally, | + | Instead you need to specify your nameservers in your network configuration. |
+ | |||
+ | * Traditionally, | ||
+ | * Nowadays, a computer can switch from one network to another quite often and the resolvconf framework is now being used to track these changes and update the resolver' | ||
+ | * It acts as an intermediary between programs that supply nameserver information and applications that need nameserver information. | ||
+ | * Resolvconf gets populated with information by a set of hook scripts related to network interface configuration. | ||
+ | * The most notable difference for the user is that any change manually done to / | ||
+ | * Instead, resolvconf uses DHCP client hooks, and / | ||
</ | </ | ||
<WRAP info> | <WRAP info> | ||
- | You may need to manually remove the DHCP record (lease) associated to this Ubuntu server from your DHCP server so the correct IP can be found by other machines on the network. | + | **NOTE: |
+ | |||
+ | Use the command **dhclient -r** for this. | ||
You might also need to manually add a **HOST(A)** record to your DNS server (for <color red> | You might also need to manually add a **HOST(A)** record to your DNS server (for <color red> | ||
Line 132: | Line 155: | ||
Lines beginning with the word **auto** are used to identify the physical interfaces to be brought up when **ifup** is run with the **-a** option. | Lines beginning with the word **auto** are used to identify the physical interfaces to be brought up when **ifup** is run with the **-a** option. | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
===== Enable packet forwarding by the kernel ===== | ===== Enable packet forwarding by the kernel ===== | ||
Line 152: | Line 178: | ||
</ | </ | ||
- | To uncomment the line, simply remove the hash mark # from the front of the line. | + | <WRAP info> |
+ | **NOTE: | ||
+ | </ | ||
IP forwarding essentially turns your server into a router, and can be used as the server has multiple Network Interfaces (NICs). | IP forwarding essentially turns your server into a router, and can be used as the server has multiple Network Interfaces (NICs). | ||
Line 163: | Line 192: | ||
<WRAP safety> | <WRAP safety> | ||
- | **SAFETY**: | + | **SAFETY**: |
+ | |||
+ | It is essential that fire-walling and security measures are in place. | ||
+ | |||
+ | These requirements will be covered through instructions later on in this setup guide. | ||
</ | </ | ||
+ | |||
+ | ---- | ||
===== Refresh sysctl ===== | ===== Refresh sysctl ===== | ||
Line 176: | Line 211: | ||
**sysctl** is used to modify kernel parameters at runtime. | **sysctl** is used to modify kernel parameters at runtime. | ||
+ | ---- | ||
===== Restart the Network ===== | ===== Restart the Network ===== | ||
Line 217: | Line 253: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ---- | ||
===== Check the network interfaces ===== | ===== Check the network interfaces ===== | ||
Line 251: | Line 289: | ||
eth1: no autonegotiation, | eth1: no autonegotiation, | ||
</ | </ | ||
- | |||
- | Ensure that all interfaces are shown. | ||
In the example output above, we can see that both eth0 and eth1 have been picked up, so all well. | In the example output above, we can see that both eth0 and eth1 have been picked up, so all well. | ||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
===== Setup the Network Hosts File ===== | ===== Setup the Network Hosts File ===== | ||
Line 292: | Line 334: | ||
One of the lines for each NIC should show **UP BROADCAST RUNNING MULTICAST**. | One of the lines for each NIC should show **UP BROADCAST RUNNING MULTICAST**. | ||
+ | ---- | ||
===== Check the network is working ===== | ===== Check the network is working ===== | ||
Line 339: | Line 382: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
===== Set the hostname ===== | ===== Set the hostname ===== | ||
Line 347: | Line 393: | ||
</ | </ | ||
+ | ---- | ||
===== Restart the System ===== | ===== Restart the System ===== | ||
Line 358: | Line 405: | ||
Once the system is rebooted simply login again and issue the **sudo -i** command to continue implementing the system. | Once the system is rebooted simply login again and issue the **sudo -i** command to continue implementing the system. | ||
+ | ---- | ||
===== Check the Network Settings ===== | ===== Check the Network Settings ===== | ||
Line 376: | Line 424: | ||
Both should show <color red> | Both should show <color red> | ||
+ | ---- | ||
===== Use an SSH Client from now on ===== | ===== Use an SSH Client from now on ===== | ||
Line 385: | Line 434: | ||
Examples of SSH Clients include Putty. | Examples of SSH Clients include Putty. | ||
+ | ---- | ||
===== Login using a SSH Client ===== | ===== Login using a SSH Client ===== | ||
Line 402: | Line 452: | ||
Go ahead and type **yes**, and then enter the password of the administrator, | Go ahead and type **yes**, and then enter the password of the administrator, | ||
+ | ---- | ||
===== Continue ===== | ===== Continue ===== |
secure_ubuntu_system/initial_setup.1589895154.txt.gz · Last modified: 2020/07/15 09:30 (external edit)