Sunday, August 20, 2017

Week 7: Iptables Firewall Configuration

Image 1

INTRODUCTION

This week there was a need to setup and manipulate the iptables. One of the first steps before starting is to disable the firewall as seen in image 1.



INSTALL

Image 2
As in all weeks prior must install iptables and firewall system config tool. This can be completed by using the following commands for iptables #yum -y install iptables-services and #rpm -q iptables. Next, firewall tool use #yum -y install system-config-firewall command. After which need to setup and restart the system. Lastly check the status to ensure it is active. See image 2.

Image 3

MANIPULATE IPTABLE

Once this is installed and status is confirmed can manipulate the table to decide access and security settings. Such as disabling telnet connections. One such command is to remove/delete certain lines. First lets check what the iptables currently appear using the command line #iptables --line-numbers -n -L in image 3.

Image 4

Next can use #iptables -D INPUT 4 command where the -D (delete) removes the 4th line changes can be seen in image 4.
Some other basic commands include the following:
-F : Deleting (flushing) all the rules.
-X : Delete chain.
-t table_name : Select table (called nat or mangle) and delete/flush rules.
-P : Set the default policy (such as DROP, REJECT, or ACCEPT).


CONCLUSION
It is important to have a good firewall setup to increase security and this is done through iptables on Linux. Above is just some basics but it puts a person on the right path to computer security.
















Sunday, August 13, 2017

Week 6: DataBase Use Linux/Fedora

INTRODUCTION
This week is to use and create a simple database in Linux. First for those who have used or have knowledge MySQL language this will be very familiar. Here will not make you an expert but will show how to ensure the program is available and create and view a simple database.


Image 1

SETTING UP
Image 2
Must first check to see if the database is loaded. On the this system using MariaDB. Mention this should any issues arise can go the following link for more information https://mariadb.org/.






In image1 (above) shows the results of the command rpm -qa | grep mariadb which ensures program exists. Next, image2 checks to make sure that the database is active using systemctl status mysqld






Image 3




 CREATING DATABASE
First need to access the database using the command mysql -u root -p image3 shows the result of the command. Notice [none] next to the mariadb this shows that you are not in an active database.



Now can create the first database. The command is the similar to what is used in MySQL. The CREATE DATABASE command and name of the database in this case JohnDB. It is important to remember to use semicolons at the end of the command lines. Example in  image4 below can see command and using the USE command to enter the newly created database. Here note that the [none] has changed to the new database.
Image 4
CREATING TABLE
In image 5 can see all the commands and entering data into the table.
Image 5

DISPLAY TABLE
In image6 can see the results of the table created in the database. Note that used SELECT * FROM command to see all data in the Employees table.
Image 6
CONCLUSION
This week installed, created a database and displayed a table from the database. Knowing the basic commands from MySQL would be very helpful in working in this system.






.

Sunday, August 6, 2017

Week 5: Setup Web Server

INTRODUCTION
This week there was a need to setup the web server. The reason to setup the server is to give the flexibility to include coordinating information flow between remote clients and local databases, interpreting scripts and streaming videos.

SETTING UP
The choice here is to use the Apache web server. One of the first steps is to turn of the firewall and iptables using the commands #systemctl stop firewalld/#systemctl stop iptables. The reason being that during this week not concerned with setting up security during server setup. After use the command #yum –y install httpd to install Apache. In image 1 use shows the results of the command #rpm -qa grep| http.
Image 1










Next step is to use the #systemctl start http commands to start the server. Following checks the status with #systemctl status http see image 2. Last is to enable the server with #systemctl enable http. Provided all steps are were followed the server is ready.

Image 2

TEXT BROWSER
Installing a text browser called links using the command #yum -y install links. After which can setup simple text pages to view using a text editor such as nano. Note that when using the text editor, unlike in previous weeks, some html language is needed such as below:

<html><body>

Apache is cool!!!

This message is from your_name_here.

</body></html>

Notice that the terms placed in the "< >" is the opening of the html language and the "</ > closes the html formatting. This is covered in other blogs/classes.

CONCLUSION
Unlike previous weeks this should be quick an easy even for a beginner. Would encourage even a beginner to get in there and try and use the terminal and text editors to unlock the potential of the Linux language.