I explained how to get a list of hosts using nmap -- using-nmap-to-generate-host-lists.html , but here is another look at the subject. The question is, how do I ping multiple hosts to find out which ones are down? Sure this could be considered a topic of system monitoring, but maybe you just want to reboot a bunch of machines, and make sure they all come back online. This quick check will tell you whether there is a problem or not. Here are three methods for pinging a list of hosts: 1.) for host in `cat all.txt `;do ping -c 1 $host; done 2.) nmap -sP -R -iL all.txt 3.) sudo fping -u < xyz/all.txt First, we assume that you have a text file named all.txt that contains a list of hostnames, one per line. Obviously, the examples here contain fake hostnames, domain names and IPs, as described in another article about vi: vim-tips-search-and-replace.html . --- all.txt --- xyz-1 xyz-2 xyz-3 xyz-4 xyz-5 xyz-6 xyz-7 xyz-8 --- end all.txt --- 1.) Use a for loop in ...
How to Buy, Accept, or Mine Bitcoin and Other Cryptocurrencies - Quick Intro Buy Bitcoin on an Exchange One easy way to get started with owning bitcoin is to buy some on an exchange, such as Coinbase. I offer this link because I think it is helpful, not just because I could get $10. Sometimes you can't tell why people recommend things. I figure, if you plan to sign up anyway, why not save a little money? With this referral link, we each get $10 in bitcoin after the new account is opened, and a trade of $100 or more is completed: https://www.coinbase.com/join/592f371c2ae3540ae4a4eb70 Note that it is not necessary to buy a full coin, but there are commissions for buying and selling, and mining fees for transfers. To minimize commissions, try entering different amounts to see how much makes sense, before completing the transaction. For example, buying $100 of bitcoin may cost as much in commissions as buying $200 worth, or around $3.00. In 2...
An easy way to get a list of hosts from a single domain that you are a part of, is to query DNS host -l mydomain.com But that is not always practical. Sometimes you have machines that are in different domains, but they all are part of a network you manage. Rather than trying write a script that pings hosts and reports the output, just use nmap for a very fast scan. To scan all hosts in a list of subnets 1) Create a subnets.dat file with one subnet on each line: $ cat subnets.dat 192.168.0.* 192.168.1.* 2) Run nmap with the subnets.dat file as input $ nmap -sP -R -iL subnets.dat Reading target specifications from FILE: subnets.dat Starting nmap V. 3.00 ( www.insecure.org/nmap/ ) Host (192.168.0.0) appears to be down. Host box1.mydomain.com (192.168.0.1) appears to be up. Host box2.mydomain.com (192.168.0.2) appears to be down. Host box3.mydomain.com (192.168.0.3) appears to be up. Host (192.168.0.4) appears to be up. ... Notice how names are resolved ...
Comments