mDNS (Avahi) working TO RPis but not between them - raspberry-pi
Avahi/mDNS is running by default on recent versions of Raspian. Great. Very convenient to just ssh pi#mypi.local.
I am doing development on a Mac and operating a local network of headless Raspberry Pis. Up until now, I was able to use mDNS to access the Pis, and the Pis used mDNS to connect to each other.
Today, I shifted the RPis to a private local network by setting them up on a wireless router unconnected to the internet. Once I join the private network, I am still able to access them via mDNS:
% ssh pi#scheduler.local
Linux scheduler 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l
Last login: Mon Aug 1 09:07:43 2022
pi#scheduler:~ $
and
wes#macbook % ssh pi#crossing.local
Linux crossing 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l
Last login: Mon Aug 1 09:07:46 2022
pi#crossing:~ $
But when they try to access each other, I get some results I don't understand:
pi#scheduler:~ $ ping crossing.local
PING crossing.local (10.0.0.1) 56(84) bytes of data.
From 192.168.0.1 (192.168.0.1) icmp_seq=1 Destination Net Unreachable
From 192.168.0.1 (192.168.0.1) icmp_seq=2 Destination Net Unreachable
From 192.168.0.1 (192.168.0.1) icmp_seq=3 Destination Net Unreachable
From 192.168.0.1 (192.168.0.1) icmp_seq=4 Destination Net Unreachable
Here's what Avahi reports:
pi#scheduler:~ $ service avahi-daemon status
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-08-01 09:07:37 PDT; 41min ago
Main PID: 388 (avahi-daemon)
Status: "avahi-daemon 0.7 starting up."
Tasks: 2 (limit: 1438)
CGroup: /system.slice/avahi-daemon.service
├─388 avahi-daemon: running [scheduler.local]
└─414 avahi-daemon: chroot helper
Aug 01 09:08:08 scheduler avahi-daemon[388]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 169.
Aug 01 09:08:08 scheduler avahi-daemon[388]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.
Aug 01 09:48:29 scheduler avahi-daemon[388]: Files changed, reloading.
Aug 01 09:48:29 scheduler avahi-daemon[388]: No service file found in /etc/avahi/services.
Here's my hosts and hostname files:
pi#scheduler:~ $ cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 scheduler
pi#scheduler:~ $ cat /etc/hostname
scheduler
What does avahi say about it? Let's see:
pi#brs-scheduler:~ $ avahi-resolve --name brs-crossing.local -4
brs-crossing.local 192.168.0.214
pi#brs-scheduler:~ $ ifconfig | grep "inet 192"
inet 192.168.0.109 netmask 255.255.255.0 broadcast 192.168.0.255
pi#brs-scheduler:~ $ ping brs-crossing.local
PING brs-crossing.local (10.0.0.1) 56(84) bytes of data.
From 192.168.0.1 (192.168.0.1) icmp_seq=1 Destination Net Unreachable
So for some reason, on this private network, mDNS is resolving correctly, but ping and ssh don't resolve properly?
What am I missing?
Unsurprisingly, since the pis worked fine on the local net and stopped working on a private net with a new router, it had to do with the configuration of the new router not mDNS.
mDNS was working fine:
pi#scheduler:~ $ avahi-resolve --name crossing.local -4
crossing.local 192.168.0.214
The new router on the private net had two operating modes "router" and "access point." In "router" mode, the router was pushing a DNS nameserver IP to clients which was somehow hosing ping and ssh and other services, despite mDNS working okay.
pi#scheduler:~ $ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 192.168.0.1
Once the router was placed in "access point" mode, and DHCP was turned on manually, everything worked.
Obscure problem. Obscure solution.
Related
Pivpn no internet
This question might seem duplicate but I've tried all other solutions which are years old so please help. I setup Pivpn on my Raspberry Pi but cannot access internet via VPN. Running ping 1.1.1.1 -I tun0 gives 100% packet loss and no response. From eth0 it works. Even ping 127.0.0.1 -I tun0 doesn't work. Below is my log of pivpn -d it doesn't show any error. ::: Generating Debug Output :::: [4mPiVPN debug[0m :::: ============================================= :::: [4mLatest commit[0m :::: Branch: master Commit: 027f257931d1f169e254def5d1552d55810fefda Author: 4s3ti Date: Thu Aug 5 15:12:33 2021 +0200 Summary: Latest Changes update. ============================================= :::: [4mInstallation settings[0m :::: PLAT=Raspbian OSCN=stretch USING_UFW=0 IPv4dev=eth0 dhcpReserv=1 IPv4addr=10.10.70.10/24 IPv4gw=10.10.70.254 install_user=pi install_home=/home/pi VPN=openvpn pivpnPROTO=udp pivpnPORT=50552 pivpnDNS1=8.8.8.8 pivpnDNS2=8.8.4.4 pivpnSEARCHDOMAIN= pivpnHOST=REDACTED TWO_POINT_FOUR=1 pivpnENCRYPT=256 USE_PREDEFINED_DH_PARAM=0 INPUT_CHAIN_EDITED=0 FORWARD_CHAIN_EDITED=0 pivpnDEV=tun0 pivpnNET=10.8.0.0 subnetClass=24 ALLOWED_IPS="" UNATTUPG=0 INSTALLED_PACKAGES=(grepcidr expect) ============================================= :::: [4mServer configuration shown below[0m :::: dev tun proto udp port 50552 ca /etc/openvpn/easy-rsa/pki/ca.crt cert /etc/openvpn/easy-rsa/pki/issued/ANY_1c949ee6-91f4-4cca-b472-e7d82dae1b44.crt key /etc/openvpn/easy-rsa/pki/private/ANY_1c949ee6-91f4-4cca-b472-e7d82dae1b44.key dh none ecdh-curve prime256v1 topology subnet server 10.3.0.0 255.255.255.0 # Set your primary domain name server address for clients push "dhcp-option DNS 1.1.1.1" #push "dhcp-option DNS 8.8.8.8" # Prevent DNS leaks on Windows push "block-outside-dns" # Override the Client default gateway by using 0.0.0.0/1 and # 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of # overriding but not wiping out the original default gateway. push "redirect-gateway def1" push "route 192.168.15.1 255.255.255.0" client-to-client client-config-dir /etc/openvpn/ccd keepalive 15 120 remote-cert-tls client tls-version-min 1.2 tls-crypt /etc/openvpn/easy-rsa/pki/ta.key cipher AES-256-CBC auth SHA256 user openvpn group openvpn persist-key persist-tun crl-verify /etc/openvpn/crl.pem status /var/log/openvpn-status.log 20 status-version 3 syslog verb 3 #DuplicateCNs allow access control on a less-granular, per user basis. #Remove # if you will manage access by user instead of device. #duplicate-cn # Generated for use by PiVPN.io tun-mtu 1400 mssfix 1360 ============================================= :::: [4mClient template file shown below[0m :::: client dev tun proto udp remote REDACTED 50552 resolv-retry infinite nobind remote-cert-tls server tls-version-min 1.2 verify-x509-name ANY_1c949ee6-91f4-4cca-b472-e7d82dae1b44 name cipher AES-256-CBC auth SHA256 auth-nocache verb 3 ============================================= :::: [4mRecursive list of files in[0m :::: ::: [4m/etc/openvpn/easy-rsa/pki shows below[0m ::: /etc/openvpn/easy-rsa/pki/: Default.txt ca.crt crl.pem ecparams index.txt index.txt.attr index.txt.attr.old index.txt.old issued openssl-easyrsa.cnf private renewed revoked safessl-easyrsa.cnf serial serial.old ta.key /etc/openvpn/easy-rsa/pki/ecparams: prime256v1.pem /etc/openvpn/easy-rsa/pki/issued: ANY_1c949ee6-91f4-4cca-b472-e7d82dae1b44.crt /etc/openvpn/easy-rsa/pki/private: ANY_1c949ee6-91f4-4cca-b472-e7d82dae1b44.key ca.key /etc/openvpn/easy-rsa/pki/renewed: private_by_serial reqs_by_serial /etc/openvpn/easy-rsa/pki/renewed/private_by_serial: /etc/openvpn/easy-rsa/pki/renewed/reqs_by_serial: /etc/openvpn/easy-rsa/pki/revoked: private_by_serial reqs_by_serial /etc/openvpn/easy-rsa/pki/revoked/private_by_serial: /etc/openvpn/easy-rsa/pki/revoked/reqs_by_serial: ============================================= :::: [4mSelf check[0m :::: :: [OK] IP forwarding is enabled :: [OK] Iptables MASQUERADE rule set :: [OK] OpenVPN is running :: [OK] OpenVPN is enabled (it will automatically start on reboot) :: [OK] OpenVPN is listening on port 50552/udp ============================================= :::: Having trouble connecting? Take a look at the FAQ: :::: [1mhttps://docs.pivpn.io/faq[0m ============================================= :::: [4mSnippet of the server log[0m :::: Aug 21 11:16:40 ANY ovpn-server[488]: ECDH curve prime256v1 added Aug 21 11:16:40 ANY ovpn-server[488]: Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key Aug 21 11:16:40 ANY ovpn-server[488]: Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication Aug 21 11:16:40 ANY ovpn-server[488]: Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key Aug 21 11:16:40 ANY ovpn-server[488]: Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication Aug 21 11:16:40 ANY ovpn-server[488]: WARNING: normally if you use --mssfix and/or --fragment, you should also set --tun-mtu 1500 (currently it is 1400) Aug 21 11:16:40 ANY ovpn-server[488]: TUN/TAP device tun0 opened Aug 21 11:16:40 ANY ovpn-server[488]: TUN/TAP TX queue length set to 100 Aug 21 11:16:40 ANY ovpn-server[488]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0 Aug 21 11:16:40 ANY ovpn-server[488]: /sbin/ip link set dev tun0 up mtu 1400 Aug 21 11:16:40 ANY ovpn-server[488]: /sbin/ip addr add dev tun0 10.3.0.1/24 broadcast 10.3.0.255 Aug 21 11:16:40 ANY ovpn-server[488]: Could not determine IPv4/IPv6 protocol. Using AF_INET Aug 21 11:16:40 ANY ovpn-server[488]: Socket Buffers: R=[163840->163840] S=[163840->163840] Aug 21 11:16:40 ANY ovpn-server[488]: UDPv4 link local (bound): [AF_INET][undef]:50552 Aug 21 11:16:40 ANY ovpn-server[488]: UDPv4 link remote: [AF_UNSPEC] Aug 21 11:16:40 ANY ovpn-server[488]: GID set to openvpn Aug 21 11:16:40 ANY ovpn-server[488]: UID set to openvpn Aug 21 11:16:40 ANY ovpn-server[488]: MULTI: multi_init called, r=256 v=256 Aug 21 11:16:40 ANY ovpn-server[488]: IFCONFIG POOL: base=10.3.0.2 size=252, ipv6=0 Aug 21 11:16:40 ANY ovpn-server[488]: Initialization Sequence Completed ============================================= :::: [4mDebug complete[0m :::: ::: ::: Debug output completed above. ::: Copy saved to /tmp/debug.log ::: Running cat /proc/sys/net/ipv4/ip_forward gives 1 so forwarding is enabled. I've ran the command sudo iptables -t nat -A POSTROUTING -s 10.3.0.0/24 -o eth0 -j MASQUERADE still doesn't work. Please note that I've changed ip from 10.8.0.0 to 10.3.0.0 still doesn't work with both. My openvpn version is OpenVPN 2.4.0
Well everything looks good. I suggest you reinstall pivpn from the official website here Also, while installation select public dns and enter any public dns, you seem to be using your ip. After reinstall and reboot, run the command sudo iptables -t nat -A POSTROUTING -s 10.3.0.0/24 -o eth0 -j MASQUERADE Also, most importantly, using ping 1.1.1.1 -I tun0 won't work even if the VPN works so stop using it and use an actual connection. You might want to create a statup script that runs the command sudo iptables -t nat -A POSTROUTING -s 10.3.0.0/24 -o eth0 -j MASQUERADE
RethinkDB: /usr/bin/rethinkdb: Permission denied on startup
I'm having a problem with init.d script on my Raspberry PI 4 (4GB) with Raspbian 10. I've followed the guide on the official docs and compiled RethinkDB without any problem. Then I've configured as described in the Deployment docs. Created conf file in /etc/rethinkdb/instances.d/<conf_name>.conf; Copied init.d script sudo cp /home/pi/rethinkdb-2.4.1/packaging/assets/init/rethinkdb /etc/init.d/rethinkdb Added Default Runlevel sudo update-rc.d rethinkdb defaults I can start the server with command rethinkdb --config-file /etc/rethinkdb/instances.d/instance1.config and it gives me no problem pi#homeserverpi:~ $ rethinkdb --config-file /etc/rethinkdb/instances.d/instance1.conf WARNING: ignoring --server-name because this server already has a name. Running rethinkdb 2.4.1 (CLANG 7.0.1 (tags/RELEASE_701/final))... Running on Linux 5.4.72-v7l+ armv7l Loading data from directory /home/pi/rethinkdb_data Listening for intracluster connections on port 29015 Listening for client driver connections on port 28015 Listening for administrative HTTP connections on port 8182 Listening on cluster addresses: 127.0.0.1, 192.168.1.3, ::1, fe80::38b8:6928:e4fd:1a9c%3 Listening on driver addresses: 127.0.0.1, 192.168.1.3, ::1, fe80::38b8:6928:e4fd:1a9c%3 Listening on http addresses: 127.0.0.1, 192.168.1.3, ::1, fe80::38b8:6928:e4fd:1a9c%3 Server ready, "homeserverpi_9x0" 00eb027b-181c-4a15-a170-8ba8299f4f3f But when I try to start the service it gives me this sudo /etc/init.d/rethinkdb start rethinkdb: instance1: Starting instance. (logging to '/var/lib/rethinkdb/instance1/data/log_file') /etc/init.d/rethinkdb: 224: /etc/init.d/rethinkdb: /usr/bin/rethinkdb: Permission denied Permissions pi#homeserverpi:~ $ ls -alh /etc/init.d/rethinkdb -rwxr-xr-x 1 root root 7.5K Nov 30 00:20 /etc/init.d/rethinkdb pi#homeserverpi:~ $ ls -alh /usr/bin/rethinkdb/ total 40K drwxr-xr-x 2 root root 4.0K Nov 29 23:06 . drwxr-xr-x 3 root root 36K Nov 29 23:06 .. Can someone please help me on this? Thank you
Handshake Failed test connectivity for OpenVPN
I am trying to set up OpenVPN on Ubuntu 20.04. I'm not experienced in this area. After I set up OpenVPN, I perform test connectivity. I received handshake error message: Sun Jul 26 05:53:17 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]68.228.217.219:1194 Sun Jul 26 05:53:17 2020 Socket Buffers: R=[212992->212992] S=[212992->212992] Sun Jul 26 05:53:17 2020 UDP link local: (not bound) Sun Jul 26 05:53:17 2020 UDP link remote: [AF_INET]My_Public_ISP_IP:1194 Sun Jul 26 05:54:17 2020 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity) Sun Jul 26 05:54:17 2020 TLS Error: TLS handshake failed Sun Jul 26 05:54:17 2020 SIGUSR1[soft,tls-error] received, process restarting Sun Jul 26 05:54:17 2020 Restart pause, 5 second(s) Then I check to log journalctl --identifier openvpn I found two error message I believe why my OpenVPN cannot connect: This is one of the error messages: Could not determine IPv4/IPv6 protocol. Using AF_INET I notice it's using my old client .conf file: Error Message My new .conf file is local.ovpn/ I tried removing client conf. sudo rm -vf BigK and replace it with local.ovpn. but it didnt work. I need help figuring this issue out. i tried researching on my own but i came up short. UPDATE After several hours of researching online. the closet post I see helping me is this post https://unix.stackexchange.com/questions/385966/openvpn-error-status-2-and-cant-connect-to-internet-while-usingwhich didn't help. I checked my client.conf client dev tun proto udp remote Public_IP 1194 resolv-retry infinite nobind persist-key persist-tun remote-cert-tls server auth SHA512 cipher AES-256-CBC ignore-unknown-option block-outside-dns block-outside-dns verb 3 <ca> Here is my server.conf local IP port 1194 proto udp dev tun ca ca.crt cert server.crt key server.key dh dh.pem auth SHA512 tls-crypt tc.key topology subnet server 10.8.0.0 255.255.255.0 push "redirect-gateway def1 bypass-dhcp" ifconfig-pool-persist ipp.txt push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" keepalive 10 120 cipher AES-256-CBC user nobody group nogroup persist-key persist-tun status openvpn-status.log verb 3 crl-verify crl.pem explicit-exit-notify Here is localvpn.ovpn client dev tun proto udp remote Public_IP 1194 resolv-retry infinite nobind persist-key persist-tun remote-cert-tls server auth SHA512 cipher AES-256-CBC ignore-unknown-option block-outside-dns block-outside-dns verb 3
I faced the same problem and didn't find any solution. I was looking for another way to connect to OpenVPN server and it helped me. Ubuntu 20.04 has a default tool for using OpenVPN: Settings -> Network Click + icon on one line with the VPN title Choose Import from file... option and select your .ovpn config file in the popup window Click Add button and that's it PS: I hope it will help somebody to save any hours
nmap seems to miss ports: doing something wrong?
If I specify a port range and scan for open ports such as the below range, I get no result, even though ports (per netstat) are clearly open and listening for web activity in this range: [me#box ~]$ ./nmap --open -A --script ssl-enum-ciphers.nse,ssl-cert.nse -p [10050-65535] w.x.y.z Starting Nmap 7.01 at 2016-01-21 16:24 CST Service detection performed. Please report any incorrect results at http.../submit/ . Nmap done: 1 IP address (1 host up) scanned in 0.63 seconds See above: nothing reported! But if I scan a specific port in that same range (the same way), I get the result I'd expect: [me#box ~]$ ./nmap --open -A --script ssl-enum-ciphers.nse,ssl-cert.nse -p 10050 w.x.y.z Starting Nmap 7.01 ( ) at 2016-01-21 16:24 CST Nmap scan report for box-name (w.x.y.z) Host is up (0.00010s latency). PORT STATE SERVICE VERSION 10050/tcp open http Apache httpd |_http-server-header: Apache Service detection performed. Please report any incorrect results at ht.../submit/ . Nmap done: 1 IP address (1 host up) scanned in 11.74 seconds What's wrong? Why doesn't it report that port (and some others) in the results from the first command line? The second command line is the same except it specifies a specific port that's known to be open (and output proves it is indeed open). Makes no sense to me. Any advice? This is nmap 7.01 if it matters. Also I'm scanning the local box itself with its own specific IP address on which the https ports are up and listening. (Not a scan of some other remote machine).
Using brackets around the port list means "Only scan ports if they occur in the services file." The nmap-services file that comes with Nmap does not contain a reference to port 10050, so that port is not scanned. In fact, you can see just which ports are scanned by using Grepable output and the -v flag: $ ./nmap -p [10050-65535] -oG - -v # Nmap 7.01SVN scan initiated Fri Jan 22 01:59:37 2016 as: ./nmap -p [10050-65535] -oG - -v # Ports scanned: TCP(1371;10058,10064,10082-10083,10093,10101,10115,10160,10180,10215,10238,10243,10245-10246,10255,10280,10338,10347,10357,10387,10414,10443,10494,10500,10509,10529,10535,10550-10556,10565-10567,10601-10602,10616-10617,10621,10626,10628-10629,10699,10754,10778,10842,10852,10873,10878,10900,11000-11001,11003,11007,11019,11026,11031-11033,11089,11100,11110-11111,11180,11200,11224,11250,11288,11296,11371,11401,11552,11697,11735,11813,11862-11863,11940,11967,12000-12002,12005-12006,12009,12019,12021,12031,12034,12059,12077,12080,12090,12096-12097,12121,12132,12137,12146,12156,12171,12174,12192,12215,12225,12240,12243,12251,12262,12265,12271,12275,12296,12340,12345-12346,12380,12414,12452,12699,12702,12766,12865,12891-12892,12955,12962,13017,13093,13130,13132,13140,13142,13149,13167,13188,13192-13194,13229,13250,13261,13264-13265,13306,13318,13340,13359,13456,13502,13580,13695,13701,13713-13715,13718,13720-13724,13730,13766,13782-13784,13846,13899,14000-14001,14141,14147,14218,14237-14238,14254,14418,14441-14444,14534,14545,14693,14733,14827,14891,14916,15000-15005,15050,15145,15151,15190-15191,15275,15317,15344,15402,15448,15550,15631,15645-15646,15660,15670,15677,15722,15730,15742,15758,15915,16000-16001,16012,16016,16018,16048,16080,16113,16161,16270,16273,16283,16286,16297,16349,16372,16444,16464,16705,16723-16725,16797,16800,16845,16851,16900-16901,16992-16993,17007,17016-17017,17070,17089,17129,17251,17255,17300,17409,17413,17500,17595,17700-17702,17715,17801-17802,17860,17867,17877,17969,17985,17988,17997,18000,18012,18015,18018,18040,18080,18101,18148,18181-18184,18187,18231,18264,18333,18336-18337,18380,18439,18505,18517,18569,18669,18874,18887,18910,18962,18988,19010,19101,19130,19150,19200-19201,19283,19315,19333,19350,19353,19403,19464,19501,19612,19634,19715,19780,19801,19842,19852,19900,19995-19996,20000-20002,20005,20011,20017,20021,20031-20032,20039,20052,20076,20080,20085,20089,20102,20106,20111,20118,20125,20127,20147,20179-20180,20221-20228,20280,20473,20734,20828,20883,20934,20940,20990,21011,21078,21201,21473,21571,21631,21634,21728,21792,21891,21915,22022,22063,22100,22125,22128,22177,22200,22222-22223,22273,22290,22341,22350,22555,22563,22711,22719,22727,22769,22882,22939,22959,22969,23017,23040,23052,23219,23228,23270,23296,23342,23382,23430,23451,23502,23723,23796,23887,23953,24218,24392,24416,24444,24552,24554,24616,24800,24999-25001,25174,25260,25262,25288,25327,25445,25473,25486,25565,25703,25717,25734-25735,25847,26000-26001,26007,26208,26214,26340,26417,26470,26669,26972,27000-27003,27005,27007,27009-27010,27015-27019,27055,27074-27075,27087,27204,27316,27350-27353,27355-27357,27372,27374,27521,27537,27665,27715,27770,28017,28114,28142,28201,28211,28374,28567,28717,28850-28851,28924,28967,29045,29152,29243,29507,29672,29810,29831,30000-30001,30005,30087,30195,30299,30519,30599,30644,30659,30704-30705,30718,30896,30951,31033,31038,31058,31072,31337,31339,31386,31416,31438,31522,31657,31727-31728,32006,32022,32031,32088,32102,32200,32219,32260-32261,32764-32765,32767-32792,32797-32799,32803,32807,32814-32816,32820,32822,32835,32837,32842,32858,32868-32869,32871,32888,32897-32898,32904-32905,32908,32910-32911,32932,32944,32960-32961,32976,33000,33011,33017,33070,33087,33124,33175,33192,33200,33203,33277,33327,33335,33337,33354,33367,33395,33444,33453,33522-33523,33550,33554,33604-33605,33841,33879,33882,33889,33895,33899,34021,34036,34096,34189,34317,34341,34381,34401,34507,34510,34571-34573,34683,34728,34765,34783,34833,34875,35033,35050,35116,35131,35217,35272,35349,35392-35393,35401,35500,35506,35513,35553,35593,35731,35879,35900-35901,35906,35929,35986,36046,36104-36105,36256,36275,36368,36436,36508,36530,36552,36659,36677,36694,36710,36748,36823-36824,36914,36950,36962,36983,37121,37151,37174,37185,37218,37393,37522,37607,37614,37647,37674,37777,37789,37839,37855,38029,38037,38185,38188,38194,38205,38224,38270,38292,38313,38331,38358,38446,38481,38546,38561,38570,38761,38764,38780,38805,38936,39067,39117,39136,39265,39293,39376,39380,39433,39482,39489,39630,39659,39732,39763,39774,39795,39869,39883,39895,39917,40000-40003,40005,40011,40193,40306,40393,40400,40457,40489,40513,40614,40628,40712,40732,40754,40811-40812,40834,40911,40951,41064,41123,41142,41250,41281,41318,41342,41345,41348,41398,41442,41511,41523,41551,41632,41773,41794-41795,41808,42001,42035,42127,42158,42251,42276,42322,42449,42452,42510,42559-42560,42575,42590,42632,42675,42679,42685,42735,42906,42990,43000,43002,43018,43027,43103,43139,43143,43188,43212,43231,43242,43425,43654,43690,43734,43823,43868,44004,44101,44119,44176,44200,44334,44380,44410,44431,44442-44443,44479,44501,44505,44541,44616,44628,44704,44709,44711,44965,44981,45038,45050,45100,45136,45164,45220,45226,45413,45438,45463,45602,45624,45697,45777,45864,45960,46034,46069,46115,46171,46182,46200,46310,46372,46418,46436,46593,46813,46992,46996,47012,47029,47119,47197,47267,47348,47372,47448,47544,47557,47567,47581,47595,47624,47634,47700,47777,47806,47850,47858,47860,47966,47969,48009,48067,48080,48083,48127,48153,48167,48356,48434,48619,48631,48648,48682,48783,48813,48925,48966-48967,48973,49002,49048,49132,49152-49161,49163-49173,49175-49176,49179,49186,49189-49191,49195-49197,49201-49204,49211,49213,49216,49228,49232,49235-49236,49241,49275,49302,49352,49372,49398,49400-49401,49452,49498,49500,49519-49522,49597,49603,49678,49751,49762,49765,49803,49927,49999-50003,50006,50016,50019,50040,50050,50101,50189,50198,50202,50205,50224,50246,50258,50277,50300,50356,50389,50500,50513,50529,50545,50576-50577,50585,50636,50692,50733,50787,50800,50809,50815,50831,50833-50836,50849,50854,50887,50903,50945,50997,51011,51020,51037,51067,51103,51118,51139,51191,51233-51235,51240,51300,51343,51351,51366,51413,51423,51460,51484-51485,51488,51493,51515,51582,51658,51771-51772,51800,51809,51906,51909,51961,51965,52000-52003,52025,52046,52071,52173,52225-52226,52230,52237,52262,52391,52477,52506,52573,52660,52665,52673,52675,52710,52735,52822,52847-52851,52853,52869,52893,52948,53085,53178,53189,53211-53212,53240,53313-53314,53319,53361,53370,53460,53469,53491,53535,53633,53639,53656,53690,53742,53782,53827,53852,53910,53958,54045,54075,54101,54127,54235,54263,54276,54320-54321,54323,54328,54514,54551,54605,54658,54688,54722,54741,54873,54907,54987,54991,55000,55020,55055-55056,55183,55187,55227,55312,55350,55382,55400,55426,55479,55527,55555-55556,55568-55569,55576,55579,55600,55635,55652,55684,55721,55758,55773,55781,55901,55907,55910,55948,56016,56055,56259,56293,56507,56535,56591,56668,56681,56723,56725,56737-56738,56810,56822,56827,56973,56975,57020,57103,57123,57294,57325,57335,57347,57350,57352,57387,57398,57479,57576,57665,57678,57681,57702,57730,57733,57797,57891,57896,57923,57928,57988,57999,58001-58002,58072,58080,58107,58109,58164,58252,58305,58310,58374,58430,58446,58456,58468,58498,58562,58570,58610,58622,58630,58632,58634,58699,58721,58838,58908,58970,58991,59087,59107,59110,59122,59149,59160,59191,59200-59202,59239,59340,59499,59504,59509-59510,59525,59565,59684,59778,59810,59829,59841,59987,60000,60002-60003,60020,60055,60086,60111,60123,60146,60177,60227,60243,60279,60377,60401,60403,60443,60485,60492,60504,60544,60579,60612,60621,60628,60642,60713,60728,60743,60753,60782-60783,60789,60794,60989,61159,61169-61170,61402,61473,61516,61532,61613,61616-61617,61669,61722,61734,61827,61851,61900,61942,62006,62042,62078,62080,62188,62312,62519,62570,62674,62866,63105,63156,63331,63423,63675,63803,64080,64127,64320,64438,64507,64551,64623,64680,64726-64727,64890,65000,65048,65129,65301,65310-65311,65389,65488,65514) UDP(0;) SCTP(0;) PROTOCOLS(0;) WARNING: No targets were specified, so 0 hosts scanned. # Nmap done at Fri Jan 22 01:59:37 2016 -- 0 IP addresses (0 hosts up) scanned in 0.10 seconds That shows 1371 scanned ports out of 55486 in the range you gave. Note that no packets were sent in this command: it's a nice way to see exactly which ports you will scan (like the default 1000, or the top 100 with -F, or some other list with --top-ports).
Not clear why my /etc/hosts look like this
I am bit confuse , my hosts file look like : > 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain > localhost6 localhost6.localdomain6 > 127.0.0.1 autoreply.panel.mywebsite.com > 127.0.0.1 myhostname > 127.0.0.1 panel.mywebsite.com why doesn't show the machine Ip address ?? Even so the website is working and the website is accessible from the web. Anyone can please explain ?? Thank you
Think of /etc/hosts as a dns system override. You can specify hostnames by IP addresses in this file. For example you could do the following: echo "127.0.0.1 google.com" >> /etc/hosts And proceed to ping google.com: [jclark#jclark530 ~]$ ping -c1 google.com PING google.com (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.028 ms Your attached server IP address(es) will show by running /sbin/ifconfig