Posted on 3 Comments

3 FREE Udemy Courses for Black Friday!

3 FREE technical courses for Black Friday! Coupons expire 11/25/16.

If you want to get started as an ethical hacker and build a keylogger using C++, you will LOVE this course!

Build a Keylogger for Ethical Hacking!

2016-11-20_0-00-33

https://www.udemy.com/how-to-create-an-advanced-keylogger-from-scratch-for-windows

Learn to program using C++ with this FREE Udemy course!

Get Started Coding with C++!

2016-11-20_0-01-15

https://www.udemy.com/learn-c-plus-plus-from-beginner-to-advanced

Learn to program web application using Angular 2!

Get started using Angular 2!

2016-11-20_0-01-51

https://www.udemy.com/learn-angular-2-from-beginner-to-advanced

 

Posted on 17 Comments

How to Start Hacking

Get the complete hacking bundle for only $19!
https://josephdelgadillo.com/product/hacking-bundle-2017/

Enroll in the 4 courses directly on Udemy!

The Complete Ethical Hacking Course for 2017!
http://bit.ly/2leW0j4

Certified Ethical Hacker Boot Camp for 2017!
http://bit.ly/2yKbler

The Complete Ethical Hacker Course: Beginner to Advanced!
http://bit.ly/2i3kirq

Build an Advanced Keylogger for Ethical Hacking!
http://bit.ly/2yMl3gI

Welcome all. This is an introduction to ethical hacking for 2016-2017. And before I continue any further, some of you may know me from the previous ethical hacking course, and this one will be significantly more advanced as opposed to that one. That being said, the requirements for this one will be also significantly different. But before we continue any further, let me just go over a few things. First of all, my throat is getting dry, because this is like the fifth time that I’m attempting this and certain people, certain very rude people keep interfering. But anyway, there a few considerations to make here. So the first one, is what can you expect to learn from this course? Well, you can expect to…I will show you basically, how you can compromise systems, monitor a traffic in the air, fight against encryption, what you can do with encrypted traffic, how you can attempt to decrypt it. Some of it you will be able to decrypt, I will show you various methods, Listening booths in the middle, and how to take off certain layers of encryption, and extract the useful information from the data which is out there in the air. I will show you various methods how to compromise systems in general, like PCs, servers, phones, smartphones that is. And we also may play around a little bit with the GSM network and see some of the vulnerabilities there. That’s a 2G network, so you have 2G, 3G and 4G. 2G is the GSM and 4G is the LTE. Anyway, we will be most likely, I will most likely at a certain point in time also talk a little bit about social engineering and you will see the practical aspect of that as well. But, there are two kind of considerations that you should make when taking this course. So, moral side of things and legal considerations. So, just because you will be able to do something, and I will teach you how to do some serious damage with the knowledge that you get you will be able to do some serious damage, but it doesn’t mean that you should. There really is no need for you to do so. And just think about it, you don’t want anybody messing with your stuff, so don’t mess with anybody else’s stuff. There really is no need, or justified reason for you to do it. Legal aspects, legal considerations. In most countries, it is illegal to mess around with systems you don’t have permission to mess around on systems that you yourself do not own. Just to give you a stupid example, it’s illegal to mess around with your neighbors Wi-Fi. It’s illegal to connect to it without that person’s permission, who owns it. So even these small, I would say, inevitable things are taken into consideration by law. Not to speak of breaking into the servers or taking information from the phones, personal information from the phones and other kinds. That’s all covered as well. So you can get into a lot of trouble if you misuse the knowledge. I will give you a lot of knowledge here, I will show you how to do various things. Please, do not abuse the knowledge. Use the knowledge, do not abuse it. Ok, that being said, let’s go over to the other side. Besides of the cute puppy up there that my friend drew, sitting over there smiling, for some strange reason. He doesn’t want to come on camera, God knows why. You will have software and hardware requirements for this course, so those are the two. You have three requirements, one is software, one is hardware and the third one is, your current knowledge, your current amount of knowledge, so to say. Let’s get into the operating systems. So, Windows and OSX are completely incompatible for our purpose. On OSX you lack a large amount of tools and you lack hardware compatibility in the first place, even though you have a Unix-like Shell, it’s really not a system that you want to use for this purpose. Windows as well, Windows is even worse. You don’t have the degree of anonymity while using Windows is not really that good. With Linux, is open source, you know all the traffic that’s coming out, that’s going in, to monitor, to know exactly what it is, all of it can be decrypted. With Windows, you will have…I notice a lot of unauthorized duplications from my machines, and it’s closed source, you don’t know what is going on in the background, you don’t know the source code. And you might say, “Well, I know the source code of Linux but I’m not a developer, I have no idea what it means” It doesn’t matter, a lot of other people know what it means, a lot of other people who made it. Somebody who says something out there on the forums, if there was funny going on there. I don’t what’s going on with Windows, under the hood, and I don’t know what’s going on with OSX under the hood, and therefore I generally don’t like using them for anything unless I am practically forced to do so. My primary operating system that I use in my daily basis for productivity work, with pen testing and development is Linux, and it has the largest, practically the best tools for development and for pen testing. It doesn’t matter which distribution you are using, you should be able to install pretty much all the tools on all the distributions out there. Anyway, you will need a machine where you will have Linux installed. So, we will need Linux as an operating system installed. I will tell you which distro to choose, I will make suggestions and I will show you how to install it. Now, to answer the questions in advance, yes, you can have a virtual machine on Windows or OSX. Yes, you can have a bootable USB with persistence storage, and yes, you can have dual boot on Windows and OSX, all these three setups are…first of all, you’re gonna encounter a lot of problems with dual boot, with both Windows and especially OSX. Linux dual booting with OSX and Windows is a huge problem, especially with the UEFI Bios. Some of you might argue and say, “Well, it’s not, I’ve succeeded in doing it” Yes, I’ve succeeded in doing it, it works, but, it’s a hassle to get it to work, or at least it was a hassle for me, the process is buggy, you will encounter a lot of problems and a lot of your problems I cannot replicate them and not know how to solve. I can’t replicate them and therefore I don’t know how to solve them, because the dual boot behaves differently on different machines with different BIOSes. On different motherboards that is. So, have a machine which has Linux installed as a single operating system. All these other optional setups, like dual boot, live USB, virtual machines, I’ll go ahead and create these videos for you and I’ll post them on Youtube as optional setups, but that’s not the setup that I will be using, that’s just something that I will post there for you, so you can have a look, but it will not be a part of this course at all. They will be on Youtube, they will be completely free, no need to registering or anything like that. If you want have that kind of setup you can go, have a look at it, but I make no guarantees there. Ok, so, in terms of hardware, First, what you need to consider is driver compatibility. Driver compatibility has been an issue for a very long time with Linux, but lately it hasn’t been a problem almost at all, because Linux nowadays supports pretty much most of the devices out there without any problems, with open source drivers, and open source drivers, yeah, they tend to work, really, really, really well with most devices out there. There are still hiccups here and there, but, it works. However, you will need to make sure that your system that you are using in terms of hardware components is compatible with the Linux kernel. You do this by basically getting the list of components of the PC and just typing in on the net, like, wireless card, what number, drivers for Linux, and it’s gonna tell you, yes, they do exist or no, they do not exist. If you type in, like, graphic card, this graphic card driver’s for Linux. Yes, they do exist or they do not exist, so that’s some of the checkups that you need to make. In general, if the drivers exist for, I mean if you have drivers in one distribution and if they’re open source you can have them for pretty much all the distributions without any problems. Next up is really important, so router access, you will need access to your home router, you will need to be able to access it. A lot of ISPs these days, they tend to block the user access to the home router. I don’t know why they do this, most likely because they don’t want a ton load of people messing around with the configuration of the routers. And they don’t know what they’re doing, so they mess things up and they call support and it takes valuable time and effort and it costs them money. So they just lock the router. But, if you don’t have access to your router, what you can do is just give them a call or write an email, asking that you would like to have a permission, that you would like them to unlock the router and they will tell you: “Okay, but you can do that at your own risk” Most likely if you mess something up, they will charge you some small amount to restore the original configuration. But, you can basically back your router up, once they unlock it. And just create a backup file and you can use that as a restore point in case you don’t know how to restore the internet connection in your house. However, you will need access to your router because we’re gonna be configuring, we’re gonna be opening up this machine to the outside world, so it will be accessible from outside world. This will be necessary for certain setups, I will show you how to configure the router and to configure….what you need to do is pretty much the same on every router, however, the interfaces on the routers will vary, but it’s quite simple, there isn’t much up to it. Wireless cards, this is also you will need to keep in mind, they need to be, not only compatible with Linux, but they need to be compatible with Aircrack and Reaver, so Aircrack-ng and Reaver. Some wireless cards function well, other do not, you can look it up on the net which ones do and which ones do not. In the final account of things, you can just go ahead and use the one that you have and see how it works out. Chances are that it will work, but again, that’s some of the information that you will look up on the net. You see, first of all you establish which chipset does your wireless card use, you can do this by typing in the model of your wireless card on the manufacturer’s website and the manufacturer will have the chipset listed there. Then you check whether that chipset has compatible drivers for Linux, and whether that chipset is supported by Reaver and Aircrack-ng. All this information is listed on the sites. So you just use your favourite search engine and, I assure you, you will find these results without bigger difficulties. If you fail by some crazy chance to do so just go with the flow and see what happens. See if it works out or if it doesn’t. The CPU, now the CPU that you have should support virtualization options, that means for Intel, you will need VT-d and for AMD you will need AMD-Vi. These are the flags which tell you if the processor is capable of virtualization. That’s the simplest explanation I can give in that regard. Make sure that your, it will be nice if your CPU supported virtualization so that you can do everything that I do as well. How do you check this? Well, you go to the manufacturer’s website and again, you see whether it’s supported or not, you can even ask the manufacturer with an email if it supports virtualization or not, just give them a call, I mean, and ask them quite literally, just give them the model number and they will be able to tell it to you, yes or no, without any problems really. Now, RAM, it will be good if this machine where Linux will be installed would have at least 4GB of RAM. Linux doesn’t necessarily requires 4GB, it’s gonna run with less than 2GB without any difficulties. It’s not RAM hungry like Windows and OSX are, but it would be good if you had more than 4. Why more than 4? For smoother operations of virtual machines, because we’re gonna have some of them, which we’re gonna set up there, and that we will use as our own small virtual servers, as our own pocket environments, where we shall conduct our research and where we will…the servers which we will use in order to go through the course, we’ll build our own environments where we will perform whatever it is that we need to do. USB, have a USB lying around, some USB, it may not be a big USB, it may not be a 3.0 USB or anything like that, pretty much any USB stick will do. What will you need it for? One of the basic things that we might need it for…I can show you how to make a cryptographic key, how you can convert it a USB into a crypto key, when you plug your USB into a laptop, you basically unbox or unencrypt your drives and it unlocks your PC. And then you can have another layer of security on top of that and it can request for a password confirmation as well. So that’s really good security for you right there. In addition to all of this, I will also show you how to monitor traffic, how to protect yourselves, how to secure your environment, how to figure out what’s going on on the network. where to post listening, where to listen for the network traffic, how to figure out what is going on and such things. And in addition to all of this, my final thing that I would like to state here, is the disclaimer. I am not in any way responsible for what you do with the knowledge that I give you, I’m giving you this knowledge in good faith, this knowledge is presented here in good faith, that you will use it properly and that you will not abuse it in any way. As all of this is for educational purposes so that you will gain knowledge, not so that you go messing around with your neighbor’s Wi-Fi. I mean, just don’t that, it’s quite stupid, you have nothing to gain and you can get into a lot of trouble for no reason of whatsoever. So, that’s it, I’m gonna go head bid you all farewell and wish you a ton lot of luck with this course and I hope that you have a lot of fun as we go through a lot of these things.

Posted on

How to Setup an SSH Host on Your Local Machine

Click here to subscribe for more videos like this!

So, the last video that we’re doing is setting up an SSH host on our local machine, and it’s really simple. So, let’s go ahead and open up terminal. We need to install openssh-server. So, go ahead and run “sudo apt-get install openssh-server” I believe it is. We’ll get an error message if that’s not it’s been awhile since I did this, so. Once we have it installed you’re basically good to go, however we are going to make it a little more secure. We’re gonna change the port that this runs on and so there is an SSH deconfig file now. Let’s go ahead and run “sudo nano /etc/ssh/ssd_config” So, we can go ahead and make this more secure by changing the port and also changing the authentication stuff. So, let’s go ahead and change the port to 2212 instead of the default 22, and then we’re going to scroll down here a bit, and under authentication here we’re going to change permit root login to no, so nobody’s gonna be able to login as root. Scroll down a bit here as well, and we’re going to add a line this is allow users, and this is going to take basically a list of usernames of users who are allowed to log in through SSH. So, I’m going to make my user account able to login through SSH and this is going to restrict all other users from connecting to this machine via SSH. So, I’m going to save it and exit, gonna clear this up, and then what we need to do is restart the SSH service. So, run “sudo systemctl restart ssh” and you’re good to go. And so now if I were on a different machine here, actually let’s see if I can get my external IP address here, I don’t think I can get it through here, no. Alright, clear this. I’m gonna open up network-tools and I’m gonna do something like if you guys have seen the movie Inception, this concept that I’m about to do will feel a little little bit familiar to you. This by the way when you go to network-tools.com the IP address that pops into the input field by default is your external your public facing IP address. This is the IP address that your internet service provider gives to you. Now, actually in order for this to work, this would have to be the only machine or I would have to set up through the router DMOZ port forwarding or a host forwarding, but what we can try, we’re gonna try it anyway. I’m going to
“ssh [email protected]” and then from here I’m going to ssh into this machine. It probably won’t forward that port. So, I would have to go through my router at this point to configure port forwarding for that port 2212 in order to be able to connect from an external host to this host. If you only have one machine, so basically like the IP address of my server when I, when I go to the IP address, it goes directly to my server. It’s not configured through NAT addresses my server actually has five IP addresses, and those IP addresses go directly to my server, and that’s why I can access SSH on that server without having to configure any routers or anything. I think actually the server provider manage that in some way. So, anyway you know if I were to go into my router and configure DMOZ or port forwarding, what I was just doing would in fact work. So, thank you guys so much for watching, and I will see you guys again soon.

Posted on

How to Transfer Files Between 2 Computers Using SFTP

Click here to subscribe for more videos like this!

Hey guys, let’s go over some SFTP. So, first what is SSTP? Well first before we answer that question, let’s ask a similar but different question, what is FTP? FTP is an acronym for the term file transfer protocol and it uses the port 21, and basically what it does is it transfers files between two machines. So, SFTP, because in regular FTP everything is transferred in clear text, so if anybody is sniffing packets on your network like we learned in a previous video, they would be able to read all those packets, basically. So, we’re not going to use FTP, I actually recommend never use FTP. SFTP is just easier anyway, and so we’re just going to use SFTP. So, similarly to the “ssh” command, you’re gonna write “sftp” and then the connection string. So, in my case it’s exactly the same as before. Then it asks for my password for the remote host, so I’m gonna put that in here, and now I can list what’s on the remote host by typing “ls” but we also have a few different commands to list what’s on the local host. I’m actually gonna exit here. I’m going to make a directory called “sftp-demo” I’m going to change into sftp-demo, and I’m going to “touch” a file called “names.txt.” Now, I’m going to reconnect while in this directory, to my server. Now, if I run “ls” I get the remote directories current directory listing, if I type “lls” I get the local listing of the directory that I’m in on the local host. And so here we can actually, we can grab files and transfer them to and from both machines. So, if I wanted to put names.text on to the server in the current directory, what I would do is type “put names.txt” and it’s going to upload it to my remote host with the same name. So, that’s when you would use “put” if you want to push a file from from your local machine to the remote host. Similarly, use the command “get” to get files. So, I’m going to, I really don’t recall any of these files, I’m just gonna get the composer.json file. So, I’m going to type “get composer.json” and if I run “lls” on my local machine I can now see that I have that file there. So, if I exit and then run “ls” I’ve got that file there. So, that is how you would use SFTP to transfer files to and from machines, and also a few commands there that can help you see what files are available. So, thank you guys so much for watching, and I will see you guys again soon.

Posted on

Using SSH to Access the Command Line of a Remote Host

Click here to subscribe for more videos like this!

Hey guys, in this video it’s all about SSH. So, first what is SSH? It’s an abbreviation that stands for Secure Shell and it basically allows you to access the shell or the command line of a remote host that has an SSH server setup. So, in one of the previous videos I connected via SSH to my own server and so I’m gonna do that again, and I’m going to explain exactly what I’m doing as I’m doing it. So, the way to get connected to a remote host through command line is using the “ssh” command, and then the only argument it’s gonna take is the connection string. So, in this case it’s my username on my remote host at, and then the remote host. So, I can use this or any other domain name that points to that server or I could use the server’s IP address, and when I hit enter it’s gonna ask for my password on that machine, so I’m gonna put it in and you’re gonna see that the prompt is gonna change. I’ve actually got this machine named the exact same thing is I have my server name, so it’s nick@voltron here, and I’m on my local machine. So, if I were to go to “var/www/html” and then run the “ls” command, I’m gonna see that I’ve got a lot of directories here actually, and a lot of these are actually unused and old projects that I worked on. But, anyway, basically once you get connected all the commands are the exact same because it’s essentially just a remote Linux shell. So, I could return to my home directory, then list those files, and you’ll see that again I’ve got just a bunch of random files. So, that is how to connect to SSH, when you’re done just type exit the connection will be closed. So, that was a really short video just to recap how to get connected is type “ssh” your remote user name at the name of the remote host, and hit enter and its gonna ask for your password. So, thank you guys for watching this video. In the next video we are going to be going over some SFTP, which is a bit bigger.

Posted on

How to Scan External Host Names & IP Addresses using Nmap

Click here to subscribe for more videos like this!

So, now you don’t only have to scan devices on your local network, you can
also scan external IP addresses or host names. So, I’m going to scan my server here by typing “nmap pointybracket.net” and then the host name of my server. It’s gonna take a moment and I’ve got a lot of open ports just because I have so many different things running. I’ve got, there’s a lot of things that run on it and some things that I just setup that I’ve never really used and haven’t bothered to shut them down, and so what we get here is my host and we can see that I’ve got FTP, SSH, SMTP, we’ve got the standard domain in HTTP, pop3, there’s a bunch of stuff here and I’m not going to go into what all those are but we can see that these are everything that the server has. You can also set a file, so let me clear this. Let’s open up gedit. So, we’re going to create a file of of hosts that we want to regularly scan and this can save time when we scan them if you’ve got like you know a few hosts that you regularly check on. So, I’m going to put “pointybracket.net” “192.168.0.1” and “192.168.0.100” and I’m gonna save this as “networks.txt” So, what we can do there is we can type “nmap -iL -/networks.txt.” so it’s a lowercase “i” and a capital “L” and then the location of that file, so it was “networks.txt” in my home directory. This is going to scan each of the hosts that is in that networks file. It returns in the order that they were scanned in, so that’s pretty neat. I want to go over a few more things with you guys regarding this command it does get pretty big there’s so much so that you can do with this, and so I really urge you guys to go and explore this if networking is one of your interests, if you want to really you know follow that. One of the things I want to show you guys is how we can turn on OS inversion detection during the scan, and so what we’re going to do is type “nmap -A 192.168.0-100” and this is going to scan, oh I had a little typo in the IP address there so I had just fix that, so this should tell me the operating system versions that are running on the devices on my network, and you can also find this information about other hosts. Aside from this, just while this is running you can scan aa network and find out which servers and devices are up and running by using the flag “-sP” You can display the reason that a port is in a particular state by having the flag “–reason” You can choose to only show opened ports which appears to be the default functionality here, it doesn’t show the closed ports. You can actually also show all of the host interfaces for a machine by typing “–iflist” in the list of arguments for this command, and I mean again it’s really big so go ahead and look this up. If you wanna type in google.com “nmap commands” there’s a bunch of different ones that you guys should play around with, this was more of an introduction onto the most common or basic functionalities of this program. I’m going to cancel this here and I’m just going to restart. This will go a bit faster, I’m just going to target my own IP address here so we can get this done and you guys can see the example output that this is gonna do when adding the “-A” slag in here. So, here you can see a lot of information about this machine. Let’s go to the top here. We’ve got the port, the state, and the service, as well as the version of the service. So, I have Apache 2.4.12 installed and that’s also the same one here. If we go down we get more information about the host cell, so we have OS UNIX, we’ve got the computer name, the domain name if anything is configured, the fully qualified domain name, and just a lot more information. So, that is the nmap command and it would be useful if you’re trying to just scan your network, and one of the examples that comes off the top of my head that would be you know when I would use command is if I noticed that the internet’s you know running a bit slow. Let’s say I’ve got 10 people in my house and half of them may or may not be using the internet and I wanna see how many people are online, this is what I would do in that instance or if you you know if you want to check how many machines offer a certain service, or what the IP address is that you need to use to access a certain service on another machine, this would help you figure that out. So, thank you guys for watching this video, I will see you guys again soon.

Posted on

Nmap Install & how to get Started

Click here to subscribe for more videos like this!

Hey guys, welcome back. This is the last video in the networking module. I just want to give you guys the tools you need to further your knowledge of networking in general, and how networking tasks would be performed on Linux. So, there is one more tool that I want to introduce you guys to called “nmap” So, nmap is an abbreviation for the term network mapper, and it’s an open source tool that can tell you what devices are on the network, what IP addresses are in use, and what services each machine is offering. So, let’s go ahead we need to install the tools so let’s run “sudo apt-get install nmap” and it’s going to download about 3 megabytes of data and it’s going to expand to 18 megabytes. Alright, now that this is installed the way we’re going to use this is by simply typing and “nmap” and then we can do a bunch of things after this. So, the first thing we’re gonna cover is how to scan specific IP address, so I wanna get the IP address that I have so I’m gonna run “ifconfig” So, “nmap 192.168.0.100 and we can see what ports are open, well we can see what ports are available, their state, and then also the service that they provide by name. So, I have Apache installed on this machine, you guys should have it installed on yours as well, if you went through the Apache videos and so you should see the same
thing here. And so the port is 80, the state is opened because we’ve got we’ve got Apache running right now, it automatically runs when start up the machine, and the service that the port provides is http. So, if I were also running an SSH server on this machine you would see another entry in this list for port 22, it would say state open, and service SSH or something to that effect. Now, if we want more information we can run “nmap -v” then the IP address again, so “192.168.0.100” “-v” means verbose and what verbos mode does in most applications is it also, aside from the regular output, it also gives you more direction on what’s happening in the application or provides more information than you would normally get, so in this instance we see that it’s doing a bunch of scans. It scans the IP address then for 1,000 ports and it finds all these ports that are open, and then also finds a bunch of a bunch of closed ports listed here, closed ports, and it it gives us the same output as before. So, that’s neat, I only have one device on my network actually except for my router. Now, my router I believe is 192.168.0.1 So, that is the IP address for my router, so what we can do is scan multiple IP addresses at a time in multiple ways. So, the first way that we’re gonna do is by specifying each IP address. So, let’s go ahead and run “nmap 192.168.0.” and then we’re going to add the last values in here separated by comma. So, first I’m going to scan my machine as well as the router and if I had a network address of 192.168.0.10 I could also do that, but I don’t so I’m not going to. Now, what we see here would be my router. We can see this is the IP address for it and this is what services it offers on which ports, and then we get my machine right here that provides the same output as it does before but this is how it would output multiple machines scan results. Now, you can also scan a range of IP address. So, let’s go ahead and run nmap command again 192.168.0.1-100 this is gonna go from 1 all the way to a 100 and it’s gonna scan all IP addresses within that range, so if I had a bunch of machines on my network, which I actually do I have my phone on that network as well, and that’s it actually so I’ve my router, my computer, and my phone. My phone is not coming up so I’m not doing anything on my computer right at the moment, I’m just checking what IP address I have on my phone here, if I can find out how. Ok, so the IP address on my phone is .101, so I’m what gonna do is run the previous command and just have it scan from 1-101. We should see three machines come up, I don’t think my phone has any services or open ports that it would list, but let’s have a look here. And when you scan multiple IP addresses the more you ,the longer it takes. Okay, so there’s nothing available from my phone coming up. Now, you can also scan, so when we talked about IP addresses we discovered that you can use anything from 0 to 255. So, if I were to want to scan all IP addresses that begin with 192.168.0, I could then put this in here, right, but rather than doing that we can actually use a wild card here. And, I’m actually gonna cancel this because it’s gonna take a while.

Posted on

Using the Traceroute Command to Track Server Requests

Click here to subscribe for more videos like this!

Hey guys, we’re about to talk about the traceroute command and what it does why you use it, but first we need to install that program. So, just come along with me run “sudo apt-get install traceroute” and it will fetch that from the repositories and install it for us, and when it’s done we can run the command. So, run “traceroute” all one word and then the domain that you want to trace the route to, and it’s gonna spit out every server that the request jumps from and to in order to get to Google’s server. When you see “* * *” it means the request has times out on that server so it’s gonna try another one. There we go. Let me make this bigger so it might be easier to read here, alright. So, we can basically trace what servers we are communicating with in order to gets to google.com. So, when I when I type in google.com into my browser, it doesn’t just go from my router, the request doesn’t get sent automatically right to Google servers, what happens is there’s a lot of intermediary servers in between the two including your ISP, the DNS servers, and then other servers that need to be hopped to order to get to Google, So, this is what we’re seeing here. The first request, this is the IP address of my router, this is the length of time that it took to get there. What happens then is this address is where this goes and you can see each address as we go down gets a bit different because we’re going to a different part of the world. And the host name will show if it’s available too with the IP address in brackets, so we can see this my ISP and this is one of their servers that my request has to hop from in order to get the information required to get to google.com. So, I’m gonna try it with my own server here so I’m just gonna type “traceroute pointybracket.net” and we can see that is accessing different servers in order to get to where it needs to be. So, in here we can see two interesting things, first of all my internet service provider, and second of all my virtual private server provider, and I’m not going to point those out, but we can see that and then we can see also everything in between that holds information about the route that our request needs to take in order to get to that server. So, that’s how to use trace route and that’s why you would is just kind of to you know trace the route of your request to different servers. So, thank you guys for watching this video and I will see you guys again soon.

Posted on

Linux Host File Explained

Click here to subscribe for more videos like this!

Alright, so I just had to restart Firefox here. This is the default server page, the route page for my server, if were gonna “server.pointingbracket.net” and actually get the exact same page, and so what I can do I believe is access the routes on the server as normal and it works. So, what we’re doing as you can see is we’re just, we’re just setting DNS records internally for this machine that it looks at before it goes at you the correct DNS information. So, again I’m gonna go to network-tools. We’re going to try with like, let’s try and find Joe’s Pizza, a
website for them, there we go. So let’s see if this works. This is the IP address I’m getting. So, I’m going to check if that IP address will route to the website as well. No, but it routes to this page. This is the page we should see after we paste this in to our hosts file. Let’s go ahead and save, and then let’s go to “go/” Close this, and there we go. And you can see how this works is basically it routes to whatever we want to route to. So, you could create shortcuts for your favorite websites with the exception of Google, Google does a lot of internal routing and stuff. Sometimes this will work, sometimes it wont. It all depends on how the web server is setup. Usually though I just use the hosts file to set domains to go to my localhost, and that’s for when I’m developing something that a URL needs to be set with. So, if I’m developing a WordPress site on my local machine and I need to set up a URL in the WordPress configuration, I would configure a domain and then point it to my localhost. So, that is the hosts file. Let’s exit out of here, close this, clear that. So, now our hostname. A hostname is basically a name of a machine, and in this instance ours is called Voltron and we can see that because we’ve got this right here. So, you can use the hostname much like the same way you can use you know custom hosts that you set, so I can just go to Voltron and its gonna route to my Apache default page. Now, you can also update the hostname and we need to do a couple things in order to do that. So, first we’re gonna run the command “sudo hostnamectl set-hostname and whatever host we want to name it to. So, “Megazord” Now we need to edit the hosts file to update our host name here as well. So, we’re going to replace “Voltron” with “Megazord” and save this and close it, and we’re gonna run “sudo service hostname restart” It said it failed to restart the hostname service, but it looks like it’s working hostname is now set to Megazord, and if I were to close the browser and reopen it I should be able to go to Megazord/ and it does in fact redirect me to my default Apache 2 page. And so that’s what a host name is and how to change it on Ubuntu, you can also change it through the system settings but we’re not going to go through a GUI way to do this right now. So, thanks for watching I hope you guys found this informative. If you have any questions just leave a comment, otherwise I’ll see you guys soon.

Posted on

What is the Linux Host File?

Click here to subscribe for more videos like this!

Hey guys, in this video we’re going to talk about hosts briefly, so in terms of our local host actually. So, there’s two parts to this video, the first we’re going to cover is the hosts file and we briefly touched on that in a previous video I think when we were, when we were deploying I think our Meteor application with Apache 2. We went into our hosts file to create some routes for the, for the application. So, basically the host file is in “/etc/hosts” so we can go ahead and open that up just type “sudo nano /etc/hosts” and hit enter. Put in your password and this is our hosts file. So, we actually did we were in here for app.localhost, subdomain in python, so the virtual hosts, and Python deployment, and Meteor deployment we were in here, and I didn’t really explain to what extent you can use this file. So, as I explained in the networking introduction video, a DNS server basically hold records of what domains point to what IP addresses. Think of this file as an internal DNS lookup functionality. So, when I go to apt.localhost the first place my computer checks for a route is the hosts file. If it doesn’t find an entry for a domain in the hosts file, then it goes out to the router, and then your ISP, and then a DNS server, and it checks there if there’s any records for it. So, by adding entries here we can actually override default behavior of known domains that we want to change. So, what I’m going to do is open up Firefox here for a moment, and I’m going to go to a website that will allow us to get the IP address of google.com, because we’re going to be using that. Just gonna go to network-tools.com and I’m gonna type in here google.com, and we can see that this IP address is the one we’re looking for. So, I’m going to copy this here and I’m gonna jump back into this file. Now, this file can take three columns and we’ve only discussed two so far, so let’s go ahead and cover all the columns here in great detail. So, the first one is the IP address that we want a route to. The second column is gonna be the domain or the host’s name that we want to route to that. So, let’s just type in go.com and then the third column is an alias, so we can just type “go”. And, so when we save this file what we’re gonna is when we go to go, it’s going to go to google.com and their their servers have actually, their not ok so they’re doing a lot of internal routing there. Let’s try YouTube. So, what we’re gonna do again, we’re gonna get actually let’s try something that we know is going to work. So, I’m just gonna type in my own server name here, and grab that IP address, jump back into our hosts file, and I’m gonna paste that there. Now I’m gonna save this again and go to go.com. It’s saying it’s not found, weird this just worked.