date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,457,876,625,000 |
I'd like nmap to send ICMP timestamp requests to the host. To achieve this I use the command:
nmap -PP "ip addr"
But among requests generated by nmap there are no ICMP requests, only TCP SYN packets.
The host is actually in my subnet. If I set "ip addr" to some non existing host from other subnet I observe ICMP time... |
From manual:
The -P* options (which select ping types) can be combined. You can
increase your odds of penetrating strict firewalls by sending many
probe types using different TCP ports/flags and ICMP codes. Also note
that ARP/Neighbor Discovery is done by default against targets on a
local Ethernet network even if yo... | Nmap is not sending ICMP timestamp requests when -PP flag is set |
1,457,876,625,000 |
An excellent command shows only those IP addresses that are responding
nmap -n -sn 192.168.1.0/24 -oG - | awk '/Up$/{print $2}'
Looking through all these can be a pain to find a few that are not responding (if looking to allocate a free IP). Is there a one-liner that shows only those addresses that are not responding... |
nmap has a verbose option -v:
Verbosity and debugging options
-v (Increase verbosity level), -vlevel (Set verbosity level)
Increases the verbosity level, causing Nmap to print more information
about the scan in progress.
It will display all hosts that were scanned rather than only those that answer and show those th... | NMap show only IP addresses that are down |
1,457,876,625,000 |
I don't have direct control over the firewall. I'm trying to troubleshoot a connection to a SFTP site from a Unix machine. Pinging the host results in a timeout, and nmap is telling me the host may be down (although it is not). I suspect the outbound connection is being blocked by firewall settings - how can I confirm... |
Not much info, but here a guideline i would follow to debug this kind of issue if not in control of the firewall:
Ping won't help, ICMP is a protocol that could be blocked as well
somewhere/somehow along the path.
Make a test using a different connection if applicable.
Make a test connecting to other SSH/SFTP site.
E... | Need to determine if firewall is blocking an outbound connection |
1,457,876,625,000 |
I have a list of ip addresses in a file, we can call that file ip.txt
I scanned a subnet using zmap at port 80. So I have about 100 addresses returned into that file. Instead of popping each ip into a web browser, how would I programmatically go about having a script go through the file and capturing a web page per ... |
Use this loop (Chromium) :
#!/bin/bash
while read ip; do
# chromium or chromium-browser on some Linux distributions
chromium --headless --disable-gpu --screenshot "http://$ip"
mv screenshot.png "${ip}.png"
convert "${ip}.png" "${ip}.jpg" # require ImageMagick
done < ip_list.txt
Or this loop (Firefox)... | Get web page from a list of ip addresses in a file |
1,457,876,625,000 |
I want to programatically process the results of nmap output but cannot work out how to take the output and extract just the details of the protocol or port tables shown in the two outputs below.
I am pretty confident I can use awk for processing the table data - but I cannot extract just that from the output... What ... |
The nmap utility allows for outputting easily parsable XML if given the -oX option, which means you can recreate the table if you wish, or extract whatever information from it that you need.
The pipeline below uses xmlstarlet to extract information from the generated XML document, and recreates the table found in the ... | Best tool to use to extract command output |
1,457,876,625,000 |
I am trying to create a simple bash script that can run the "specific" port scan on mulitple IPs and Ports using nmap -p.
The issue I am having is that when it reads the port# followed by the IP from the .txt file, the text file has the necessary space between port and IP, but it causes the script to fail. The code I ... |
for i in $(cat file); ...
Does not read your file line by line but word by word.
You can use while read ...:
while read port ip; do
nmap -p "$port" "$ip"
done < "file"
See also: Why is using a shell loop to process text considered bad practice?
| How can I use nmap -p and cat 'file'? |
1,457,876,625,000 |
I have two Debian 11 machines (192.168.0.2 & 192.168.0.3) connected to the same router (gateway at 192.168.0.1). I have disabled firewall (ufw) of both. But when I did a port scan via nmap from 192.168.0.2 to 3 ($ nmap 192.168.0.3) I get only 22/tcp ssh open as follows
Starting Nmap 7.80 ( https://nmap.org ) at 2021-0... |
There are many questions explaining the difference between an open port in the firewall context and an open port in the nmap context.
In short: in the context of nmap, a port is open when there is a process listening to it. If you only have an ssh process listening, then only that port will be open.
I always compare i... | Why only a few ports (like ssh, http, https) are appeared to be open while all others are closed in nmap, on a host without firewall? |
1,457,876,625,000 |
Why does the target of a nmap scan, where the target does not exist get entered into the arp cache?
nmap -v -P0 -sT 192.168.1.103
That scan always shows "host up".
This behaviour made me go crazy >:(
Edit: The arp cache is as shown in the correct answer. Thanks guys!
|
It shows "host up" because you told nmap to assume the host is up—that's what -P0 (or its newer equivalent -Pn) does.
Presumably it shows up in the arp cache like this:
Address HWtype HWaddress Flags Mask Iface
192.168.1.103 (incomplete) ... | nmap & arp cache behaviour |
1,457,876,625,000 |
I have a large nmap scan containing a number of logs. I'm trying to turn this into a list of ip's only.
When I run my command I receive feedback like the following:
Starting Nmap 7.25BETA2 ( https://nmap.org ) at 2017-03-17 21:27 EDT
Nmap scan report for 10.10.1.22
Host is up (0.13s latency).
PORT STATE SERVICE
25/t... |
You start with using the proper output format for Nmap for this type of thing. Nmap's Grepable output option (-oG) produces output in an easy-to-parse format that is consistent between versions, unlike the "human-readable" normal output. Here's how to get the list of all systems with port 25 open:
nmap -p 25 --open 10... | Using regular expressions to parse ip addresses from logs |
1,457,876,625,000 |
I'm trying to audit firewall rules on a host. This is typically pretty straightforward to do with nmap or a similar scanning tool. The problem is that I can only run the audit on the host itself. Normally, if you run a port scan with nmap against the current host, nmap will use the loopback interface. This is a pr... |
The problem is that the Linux routing tables always route traffic locally through the loopback interface and do not put it on the physical network if the local system has a network interface listening for the destination IP address. You can see the local routing table with ip route show table local - all packets matc... | How can I port scan a host from itself without using the loopback interface? |
1,457,876,625,000 |
I get unintuitive results from "nmap -A " which I want to clarify.
Setup:
sshd (ssh deamon service) is successfully running.
postfix is installed and so smpt service is running. However, it only configured to send mail, not to receive.
apache not installed, iptables empty, ufw not installed.
From this primary nmap do... |
These are common ports blocked by internet service providers.
It is impossible to tell if that is your issue from the information provided but 25 is often blocked to limit open spam relays. 135, 139 and 445 are often blocked to protect customers with unintentionally open file shares which used to be very common.
In t... | nmap "filtered" results on a pretty naked server - could "filtered" just mean "silence"? |
1,457,876,625,000 |
Just trying to figure out the ip of a wifi device.
I'm using:
fpollano@debianfx:~$ nmap -n 191.168.0.0-254
Starting Nmap 6.00 ( http://nmap.org ) at 2015-06-19 21:06 EDT
Nmap done: 255 IP addresses (0 hosts up) scanned in 103.19 seconds
fpollano@debianfx:~$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes... |
nmap -n is going to do a TCP port scan on the 255 IP addresses you specified. If the machines at those IP addresses have no ports open, I'm thinking you won't get anything back.
ping uses ICMP packets, which is at the IP level, "below" the TCP level. It only identifies machines (ethernet interfaces, really) not the po... | Unable to use nmap |
1,457,876,625,000 |
$ time nmap -q -sV -P0 -p80 google.com | fgrep '80/tcp open'
80/tcp open http Google httpd 2.0 (GFE)
real 0m6.563s
user 0m0.280s
sys 0m0.016s
$
Are there any faster methods to get info about the webserver?
Google httpd 2.0 (GFE) is enough
|
For most HTTP servers, Nmap simply grabs the Server header, so that could be enough. To get that information, try this:
printf "HEAD / HTTP/1.0\r\nHost: $TARGET\r\n\r\n" | nc $TARGET 80 | awk '$1=="Server:"{$1="";print}'
Otherwise, if you want to use Nmap, there are some ways you could speed things up.
Use -n to avo... | How to get info about given webserver FAST? |
1,457,876,625,000 |
I want to install a fork of nmap in Kali Linux, but I'm worried that it will conflict with the original program when I type nmap in the terminal. Can I change its name from nmap to nmap2?
|
You can rename the application to whatever you like. For example, if the application is installed into /usr/local/bin then,
mv /usr/local/bin/nmap /usr/local/bin/nmap2
| How to change the name that evokes a program in Debian-based distros |
1,457,876,625,000 |
i have a quick question about tcp port states: suppose i am establishing a tcp connection to a server: source address/port should be 44.44.44.44:33456 destination address/port is 55:55:55.55:443. in what state is port 33456 in while waiting for the answer from the server? would nmap recognize the port as listening?
an... |
in what state is port 33456 in while waiting for the answer from the server?
https://en.wikipedia.org/wiki/Handshaking#TCP_three-way_handshake
It's not in a listening state no matter if a connection has been established or not.
would nmap recognize the port as listening?
No, never.
and how would it behave with ud... | state of tcp/udp source ports when waiting for answer from target |
1,457,876,625,000 |
I want to find a specific command in help section e.g I want to know what is the sync command. How do I search in man nmap or nmap -h? I specifically do not want a list of all commands.
2nd quest.
I am scanning windows 2019 server, firewall is off. I even open Inbound and Outbound ports for test. but nmap result show... |
It depends on your man pager. Default uses Vim-style key bindings. That means you need to press / to enter forward searching mode (? for backward searching).
You press / and then searching phrase (e.g. /sync) then press Return. It will take you to the first occurrence. Press n to go to next one, N for previous.
| How to search something using a keyword in man command (man nmap)? [closed] |
1,457,876,625,000 |
We had a lab where we scanned a vulnerable system where alot of ports were closed, so it returned alot of ICMP messages as expected and it took a long time. But then I tried to scan my own Debian 10 system I expected to see the same because I have not setup a firewall as far as I know, but it went very fast, only reci... |
The default linux kernel behaviour is to respond with ICMP type 3, so either you do have a packet filter silently dropping you packets somwhere between nmap and the target or the responding machine is routing icmp responses to an interface, from which they can't reach you.
| Why do I not get an ICMP message in responce when doing an UDP scan with nmap? |
1,457,876,625,000 |
I tried this command but its not scanning udp ports...
nmap --open -p T:22,25,53,80,111,443,465,587,953,993,995,3306,5666,8891,U:53,68,111,323,715 13.235.13.13
What is the correct way for scanning udp + tcp ports at a time?
|
From Nmap documentation portal:
Note that to scan both UDP and TCP, you have to specify -sU and at least one TCP scan type (such as -sS, -sF, or -sT). If no protocol qualifier is given, the port numbers are added to all protocol lists.
So you can use:
nmap --open -sT -sU -p T:22,25,53,80,111,443,465,587,953,993,995,... | How to scan range of tcp and udp ports at a time using nmap? |
1,457,876,625,000 |
I am using nmap to scan my network and want to show every device that is up.
The following works great:
ips=$(nmap -sn 192.168.1.68/24 -oG - | awk '/Up$/{print $2, $3}')
What I now want to to is to save every output in a seperate variable.
Lets say ips give this output:
$ echo "$ips"
xxx.xxx.x.1 (device1)
xxx.xxx.x.... |
Don't create a bunch of separate scalar variables, just save the command output in an array instead of a scalar variable and then you'll be able to access it as ips[0], ips[1], etc. Using printf instead of your current nmap | awk pipeline for simplicity to reproduce your exact command output:
$ printf 'xxx.xxx.x.1 (de... | assign nmap output to several variables |
1,553,465,427,000 |
I have this command which works well to give me a list of IP addresses, MAC addresses, and MAC vendor, sorted by IP address.
sudo nmap -sn 192.168.103.0/24 | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print ","substr($0, index($0,$3)) }' | sort -t . -k 4,4n
All I need to do is change my awk print statement... |
A simple solution will be to pipe the result to another awk .
nmap -sn 192.168.103.0/24 | \
awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print ","substr($0, index($0,$3)) }' | \
awk '{ print $1","$2" "$3" "$4" "$5" "$6 }' | tr -d '()' | sort -t . -k 4,4n
The begin of this command is the same i added... | nmap output in CSV format sorted by IP address |
1,553,465,427,000 |
I have legacy system on Redhat Linux 5.6, with Nmap 4.11. ( IP: 10.11.4.22 ). I want to block access from this legacy system via every port/protocols to another server( IP: 10.11.4.24 ).
I first flush the existing rules via iptables -f
Then apply following rules
iptables -A INPUT -s 10.11.4.24 -j DROP
iptables -A OU... |
Your output line wants to drop packets that come from your intended destination:
iptables -A OUTPUT -s 10.11.4.24 -j DROP
You probably meant to drop data going to your blocked host instead:
iptables -A OUTPUT --dst 10.11.4.24 -j DROP
| nmap bypass iptables rules | Redhat 5.6 [closed] |
1,553,465,427,000 |
I'm trying to ping the health of VM's using nmap utility.
# nmap -v -n -sP 192.168.102.116
Host 192.168.102.116 appears to be down.
Note: Host seems down. If it is really up, but blocking our ping probes, try -P0
Nmap finished: 1 IP address (0 hosts up) scanned in 2.006 seconds
then I tried with direct ping, as i... |
How come nmap is taking less time? I can't seem to reproduce that. In your case it is giving you a lower time since it can't reach the server so those times can't be compared.
ping -c1 ip-to-check will only send one probe and will take very little time.
In your case, and according to your outputs there seems to be som... | How to specify nmap to add redirect address? |
1,553,465,427,000 |
I'm using nmap with proxychains on my kali
When I write proxychains nmap -A [Destination]
I get the following error
ProxyChains-3.1 (http://proxychains.sf.net)
Starting Nmap 7.01 ( https://nmap.org ) at 2016-09-08 20:02 UTC
|S-chain|-<>-127.0.0.1:9050-<--timeout
|S-chain|-<>-127.0.0.1:9050-<--timeout
*** Error in `nm... |
First, don't use Proxychains 3.1. It's old and unmaintained. Proxychains-ng works better.
Second, the statement that "-sF -sX worked fine" is incorrect. That is to say, they probably worked, but they did not use your proxy chains. Programs like proxychains, torify, and others only intercept standard socket calls; Nmap... | problem using nmap with proxychains [closed] |
1,553,465,427,000 |
(Ubuntu 14.04.4 LTS)
traceroute has -m, --max-hop=NUM, as does tracepath.
How can I limit the max number of hops when using:
nmap -Pn -sn --traceroute
?
|
Nmap uses a different algorithm for tracing than traceroute(1), so the idea of a hop limit does not make sense.
Traditional traceroute uses UDP packets to high-numbered ports and starts with a TTL of 1 to discover the very next hop on the path to the target. Then it increments to 2 to discover the second hop and so fo... | Nmap traceroute max TTL |
1,553,465,427,000 |
There is a great tool:
https://github.com/robertdavidgraham/masscan
that we can use if a bigger network need to be scanned for various aspects.
But, can the masscan use the Nmap Scripting Engine?
For example, the "File ssl-heartbleed"?
http://nmap.org/nsedoc/scripts/ssl-heartbleed.html
|
Masscan cannot use NSE, since it is a different program entirely. However, it does have some advanced features like Heartbleed detection. See the author's blog for more details, but here's the basic command-line:
masscan 10.0.0.0/8 -p443 -S 10.1.2.53 --rate 100000 --heartbleed
| Can masscan use the Nmap Scripting Engine? |
1,553,465,427,000 |
I'm building a Linux OVA on a VM to scan stuff with nmap.
I'm using cron to keep my packages up to date:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
It's from my understanding that nmap should be kept up-to-date with this.
However, I've seen this command on different blogs: nmap –script-updatedb.... |
The scripts in /usr/share/nmap/scripts are all part of the nmap-common package. Thus, one might think that running nmap –script-updatedb needs to be run when that package is either installed or upgraded. However, the database file itself is also part of that package:
# dpkg -S script.db
nmap-common: /usr/share/nmap/s... | Does 'apt update' also update nmap's scripts? |
1,553,465,427,000 |
Should ports that are in LISTENING, ESTABLISHED or not identified states appear as open ports in nmap?
Doing some search on google I've found this:
Any "ESTABLISHED" socket means that there is a connection currently made there. Any "LISTEN" means that the socket is waiting for a connection. Both are opened ports but ... |
Should ports that are in LISTENING, ESTABLISHED or not identified states appear as open ports in nmap?
LISTENING, yes. ESTABLISHED, no. An 'established' socket represents a connection that already exists, and is not in any way an "open port".
Note how the output doesn't actually tell you which side was originally li... | Does STATE LISTEN or ESTABLISHED means I should see an open port when using nmap? |
1,553,465,427,000 |
I have made a fresh install of CentOS Stream 8 on a machine. This machine needs to connect to a Foreman Smart Proxy on port 443.
If I run nmap immediately after machine boots up, it sees the port as open:
[root@centos8stream ~]# nmap mysmartproxy -p443
Starting Nmap 7.70 ( https://nmap.org ) at 2022-04-06 15:52 CEST
N... |
I've found that having nmap make a full-open (TCP Connect) scan via the flag -sT makes it see the port as open. So my issue is solved. However, this does not explain the reason of the change in behaviour after the machine boots. If someone has ideas I'd be interested to hear them.
| Port is shown as "open", then as "filtered" on CentOS Stream 8 |
1,553,465,427,000 |
I have got an IP camera which, according to the manual, is supposed to have static IP address 192.168.1.110. To connect to it (and change the network settings) I configured my laptop to have static IP 192.168.1.1/255.255.255.0 and connected it directly to the camera (without any routers/switches in between).
The lapto... |
Wireshark rulez.
As suggested by C. M. in the comments to the question:
use Wireshark to sniff any possible packets from the camera and extract the IP/MAC from that
So, I started sniffing the network interface and plugged the cable in. Among a bunch of weird stuff there were a few incoming packets from some 192.168.... | How to find out the static IP address of a device? |
1,553,465,427,000 |
I use nmap to find devices on my network that has the port 5300 open. At first it worked great. I could find devices in no time, but then I rebooted my computer and now nmap just stalls during the scan and does nothing. Here's my command with nmap 7.80:
nmap -Pn -oG - -p5300 --min-parallelism 5 --max-rtt-timeout 100ms... |
Okay so it seems my research on this were unsuccessful through google but this related question fixed my issue: nmap scan takes 50 minutes
Basically removing -Pn prevent nmap from trying to ping 10k ports on 255 devices. It wasn't stalling, simply doing ALOT of pings.
| Nmap stalling after reboot |
1,553,465,427,000 |
I'm trying to determine which ports are in use with my machine. I found, online an article that listed one method as follows:
$ sudo nmap -sT -O localhost
I believedthis would give me a list of all ports listening for TCP packets. However, when I enter this command, I get the following result:
Starting Nmap 7.91 ( ht... |
It you're trying to determine which ports are in use with your machine you don't need to scan. You can just list the ports directly
netstat -nap
ss -nap
If you're not root omit the -p flag. The LISTEN lines are the important ones for you, and you can filter for these with awk. For example
netstat -nap | awk 'NR==1 ||... | Why can't I run nmap with the -O option even when I use sudo |
1,553,465,427,000 |
Given the output of nmap against a subnet
Nmap scan report for 192.168.1.20
Host is up (0.010s latency).
MAC Address: EC:13:B2:E2:20:48 (Netonix)
Nmap scan report for 192.168.1.21
Host is up (0.010s latency).
MAC Address: EC:13:B2:E2:13:68 (Netonix)
Nmap scan report for 192.168.1.23
Host is up (0.010s latency).
MAC Ad... |
The normal thing to do is to store the needed info from all the lines into awk variables and then print out the data on the final line in the block. So for the example you would have something like this (I have not coded the host down latency case as the example data doesn't show it).
nmap -sP 192.168.1.0/24 -n --max-... | AWK concatenate output lines while extracting specific strings |
1,553,465,427,000 |
I have a VServer, in which I installed the firewall UFW. I scanned the Server with NMAP but I it showed a lot open Ports, which I didnt open. Is it a Bug? Or did I installed UFW false?
Thank you
ufw status:
http://prntscr.com/pgp5db
nmap:
nmap -T4 -A -v *********
//edit I solved the problem. The Problem was I just use... |
Installing UFW and activating the systems unit is not sufficient.
You need to configure it.
The normal default is that everything is denied and UFW therefore disabled after installation (including start of service).
Check ufw status output and be careful not to enable the firewall configuration via UFW or other means ... | NMAP shows open ports even tough I installed the UFW firewall |
1,553,465,427,000 |
I have network log file like this one:
Nmap scan report for 192.168.1.51
Host is up.
PORT STATE SERVICE
80/tcp open http
443/tcp open https
8080/tcp open http-proxy
443/tcp open https
8080/tcp open http-proxy
8082/tcp filtered redcap
8083/tcp filtered https-alt
Nmap scan report for 192.... |
awk solution:
awk 'BEGIN{RS=""; FS="\n"}
{split($1,a," "); host[a[5]] = 0; for (i=1; i<=NF; i++) if (match($i,"open") != 0)
host[a[5]]++} END{for (each in host) print each " - " host[each]}' file
192.168.1.10 - 2
192.168.1.201 - 2
192.168.1.51 - 5
192.168.1.17 - 1
In this command the record separator R... | count matching open ports in a network log file |
1,553,465,427,000 |
I'd like to print only the IP address and open ports field from a given a gnmap file.
Host: 123.123.123.123 () Ports: 80/open/tcp//http?///, 443/open/tcp//https?///, 8083/closed/tcp//us-srv///, 65001/closed/tcp///// Ignored State: filtered (65531) Seq Index: 262 IP ID Seq: Randomized
Host: 123.123.123.124 () ... |
awk '/\/open\//{
l=$2
for (i=3;i<=NF;++i) {
if ($i~/\/open\//) l=l" "$i;
};
print l
}'
Explanation:
If /open/ matches the line:
Create a variable with the IP ($2)
Loop through fields $3-NF and add the field to the variable if /open/ matches.
Print the variable.
| Use awk to print only the IP and OPEN ports field |
1,553,465,427,000 |
How is possible to check if the port 5432 of my NAS synology DiskStation (DS216j) (IP address 192.168.0.16 ) is open?
I have (in the control panel of the NAS), enabled the firewall and created a rule for allow the destination/source port 5432 to be open.
As a test i tried to use from Linux-Ubuntu the command nmap (in ... |
I have fixed this with this commands:
In order to open the ports I had to:
1 - Set in the NAS control panel a rule on the firewall so that the port 5432 is open.
2 - Modify 2 files : pg_hba.conf and postgresql.conf
In order to do that I had to:
connect with ssh to the NAS with an active account previously created in ... | PostgreSql port open on NAS Synology DiskStation (DS216j) |
1,553,465,427,000 |
I have an assignment to do at school. They asked us to take 2 tools that has port scanning and finger printing and compare there results.
I got the one tool nmap do you know any other?
|
I wish this link would help you.
tools for hacker
| Any similar tools like nmap for port scanning and finger printing OS |
1,553,465,427,000 |
So I have this peace of bash code to execute nmap command with different arguments in $line variable
When I transform it into an in-line command it works perfectly with separated arguments from $line, but in a script, it takes what's in $line as one argument
Not sure if it's an Nmap issue or a bash issue but since it ... |
Thanks guys, turned out to be a weird issue
I was adding to an array before this function with something like this:
array <<< elements (i dont remember the exact line)
Apparently the three <<< missed up the code that comes after for some reason, idk why but I worked it around by adding to the array without <<<
| Passing commands arguments in a variable |
1,466,434,613,000 |
So I'm trying to give a VM a static IP address, this case has been particularly stubborn.
The VM is running on a ESXi cluster with its own public IP range.
I had it (sorta) working with an IPv4 address, except it would be reassigned every boot, now after fiddling with nmcli I can't get any IPv4 address assigned to it.... |
Try:
# nmcli con add con-name "static-ens32" ifname ens32 type ethernet ip4 xxx.xxx.120.44/24 gw4 xxx.xxx.120.1
# nmcli con mod "static-ens32" ipv4.dns "xxx.xxx.120.1,8.8.8.8"
# nmcli con up "static-ens32" iface ens32
Next, find the other connections and delete them. For example:
# nmcli con show
NAME UUID ... | Assigning static IP address using nmcli |
1,466,434,613,000 |
I tried to assign a static IP to my Ubuntu 16.04 server using nmcli, which worked but it still has the original IP reserved as a "secondary" IP. I'm not sure how to get rid of it. 10.163.148.36 is the original IP of the server and 10.163.148.194 is the new IP I want it to switch to. I used the following nmcli comma... |
in »Red Hat« the syntax would be like this:
nmcli con mod "Wired connection 1" -ipv4.addresses "10.163.148.194"
You just add a Minus before your Property
It might work like this in Ubuntu as well…?
| Remove secondary IP with NetworkManager / nmcli |
1,466,434,613,000 |
My wifi card keeps connecting to a wifi network which is on a channel that prevents me from making a hotspot.
I'm trying to turn the connection off from command line. I have tried a few things:
nmcli radio wifi off
and
ifconfig wlo1 down
Problem with these is that they turn the wifi interface off which also prevents... |
LANG=C nmcli d
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected connectioname
eth0 ethernet unmanaged --
lo loopback unmanaged --
Here you can see the name of the connection as connectionname.
To disconnect, run nmcli con down id connectionname.
| nmcli disconnect without turning wifi card off? |
1,466,434,613,000 |
An installation of CentOS 7 has two connections and three devices. How can I attach the device ens7 to the connection my-bridge? And how can I attach the device eth0 to the connection my-eth1?
Here is the relevant data from the terminal:
[root@localhost ~]# nmcli con show
NAME UUID TYPE ... |
The easiest would be
nmcli device wifi connect <name ssid> password <the password>
Check this bash script for a solution with the password as variable.
This script offer you the choice of selection and hidden password.
| how do I attach devices to connections using nmcli? |
1,466,434,613,000 |
Is there a way to create a hotspot that doesn't have a password?
The "hotspot command" of nmcli :
wifi hotspot [ifname ifname] [con-name name] [ssid SSID]
[band {a | bg}] [channel channel] [password password]
does not allow to have a empty password: it gives
Error: Invalid 'password': '' is not valid WPA PSK... |
It is not possible to create an open hotspot through wifi hotspot command , because nmcli will generate a password for you (WPA or wep) , the --show-secrets option will be used to print the password.
The easy way to create an open wifi-hotspot is using create_ap command:
To install it run:
git clone https://github.com... | How to generate a hotspot that does not requires password? |
1,466,434,613,000 |
With NetworkManager, how do I set the currently connected connection on my device (say wlp2s0) as metered?
How do I unset it in such a way that guessing of the metered/unmetered state will still occur?
Note: some hotspots will be metered (eg my phone) and some won't (eg home), so setting this on the device isn't what ... |
I really hope that this isn't the best answer: it seems convoluted in the simple case, and even more so if allowing for a binary SSID. Anyways, here goes:
Get device's current connection
nmcli -t -f GENERAL.CONNECTION --mode tabular device show $DEVICE | head -n1
-t is required as there is a space appended at the end... | NetworkManager: Set current connection of device as metered |
1,466,434,613,000 |
I've written a script that converts the output of
nmcli --mode multiline dev wifi into JSON,
but I'm finding it's inconsistent (breaks when results have a space),
long, and hard to read.
I wonder if it is possible to pipe the results directly into jq.
The nmcli output (input to my script) looks like this:
*: ... |
The script that you linked to is extremely inefficient - you're doing a lot of useless pre-processing...
Use nmcli in --terse mode since, per the manual, "this mode is designed and suitable for computer (script) processing", specify the desired fields and pipe the output to jq -sR e.g.
printf '%s' "$(nmcli -f ssid,mod... | Parse colon-separated value pairs (nmcli output) and convert to JSON fromat |
1,466,434,613,000 |
I'm able to get the signal strength of all Wi-Fi networks with the following command:
$ nmcli -t -f SIGNAL device wifi list
$ 77
67
60
59
55
45
44
39
39
37
I would like to reduce this list only to the current Wi-Fi on which I'm connected. I've been through the man page but can't find the necessary f... |
nmcli --version
nmcli tool, version 1.6.2
To get the SIGNAL of the AP on which you are connected, use:
nmcli dev wifi list | awk '/\*/{if (NR!=1) {print $7}}'
The second * mark in nmcli dev wifi list is set to identify the SSID on which your are connected.
nmcli --version
nmcli tool, version 1.22.10
use:
nmcli dev ... | Get connected Wi-Fi network signal strength with nmcli |
1,466,434,613,000 |
With nmcli, I can modify VPN data like this:
nmcli con modify myvpn vpn.data 'refuse-pap = yes, user = xxx'
So I'm wondering if I can set password this way as well?
|
Yes, you can modify the value of any property with nmcli. In this case, you would use:
nmcli con modify "myvpn" vpn.secrets "password=myverysecretpassword"
| Use nmcli to modify VPN password? |
1,466,434,613,000 |
Is it possible to create a wireless bridge connection (br0) for any wireless nic (wlan0) using nmcli tool.?
End of the day system should have master bridge-connection(br0) that uses wlan0 nic as it's bridge-slave.
|
This is not possible.
"Note that a bridge cannot be established over Wi-Fi networks operating
in Ad-Hoc or Infrastructure modes. This is due to the IEEE 802.11
standard that specifies the use of 3-address frames in Wi-Fi for the
efficient use of airtime."
Source: https://access.redhat.com/documentation/en-US/Red_Hat_E... | How to create wireless bridge connection with nmcli |
1,466,434,613,000 |
I can set my wifi key of the connection my_connection to my_password by running
nmcli con modify my_connection wifi-sec.psk my_password
How can I have a secured interactive password reading from nmcli, i.e with prompt and not showing the entered letters as for passwd command?
|
Instead of using modify and set wifi-sec.psk, use nmcli edit id myid and then activate in the interactive mode and it will prompt for password securely.
| How to set wireless key with nmcli interactively and securely without entering it in the command |
1,466,434,613,000 |
I'm trying to reuse an old Asus EEE "a-la-RaspberryPi", as a small, single task unit. Since I am familiar with Fedora, I have installed Fedora 27 on it via VNC (the default graphical installer is too big for the EEE screen), but I did not install any desktop environment (I don't need it, plus even LXDE would have req... |
You are probably missing the NetworkManager-wifi package.
# dnf install NetworkManager-wifi
To apply changes, restart NetworkManager.service:
# systemctl restart NetworkManager
| How can I find out what plugin is missing in nmcli? |
1,466,434,613,000 |
I have a strange scenario over here:
If I run nmcli dev wifi list it shows me a list of all networks which is fine. As soon as I add the device (wlan0 in my case) to the /etc/network/interfaces file and reboot it shows no networks.
So before reboot the /etc/network/interfaces contains:
#iface wlan0 inet manual
# wpa-... |
This is normal. The NetworkManager don't manages devices in /etc/network/interfaces by default. You can change it in /etc/NetworkManager/NetworkManager.conf key [ifupdown]
managed=true
| nmcli shows nothing |
1,466,434,613,000 |
When creating new interfaces with nmcli, ip address can be set with both ipv4.addresses and ip4 parameter.
Is there a differance between these?
examples
nmcli con add ifname ens192 con-name ens192 type ethernet ipv4.addresses 192.168.0.10/24
vs
nmcli con add ifname ens192 con-name ens192 type ethernet ip4 192.168.... |
From nmcli manual:
Table 25. IPv4 options
┌──────┬────────────────┬────────────────────────┐
│Alias │ Property │ Note │
├──────┼────────────────┼────────────────────────┤
│ip4 │ ipv4.addresses │ The alias is │
│ │ ipv4.method │ equivalent to the │
│ │ ... | Differance between ip4 and ipv4 addresses, nmcli? |
1,466,434,613,000 |
I am trying to write a bash script to configure a number of network interfaces and have issues with some of the NICs getting a Wired Connection name instead of the device name. E.g.
$ nmcli dev status
DEVICE TYPE STATE CONNECTION
ens22 ethernet connected ens22
ens18 ethernet co... |
In NetworkManager terminology, a device is the NIC (or a virtual abstraction of one), and a connection is a set of network configuration parameters that can apply to any suitable device, unless specifically restricted to match a particular device only. Even if so restricted, the connections and devices are separate co... | How to change network interface name |
1,466,434,613,000 |
Using nm-applet, it's quite easy to save a VPN connection and username+password of the connection and then automatically connect to it when using a certain Wi-Fi connection. It will always automatically connect to it without asking for passwords.
How to achieve this in the terminal using nmcli and other commands? I'm ... |
Here's a detailed explanation from my initial comment. The goal is to learn what is the equivalent using the CLI tool nmcli without having to browse through all the documentation to pinpoint a setting as long as it's known by the user on the GUI tool: with the temporary help of this GUI tool nm-applet, which has to be... | How to use nmcli to always connect to vpn when using certain wifi? |
1,466,434,613,000 |
nmcli allows to disable a connection using nmcli connection down <id>.
But let's say I have a connection that I want to disable by default,
and maybe only in rare cases activate it.
How can I configure that, so that I don't have to use nmcli connection down on every system-startup?
|
You will need to set the connection's autoconnect property to no:
nmcli connection modify <connection> connection.autoconnect no
| How to set connection to down by default with nmcli |
1,466,434,613,000 |
I have created a script called connection.sh, it is used to automatically connect to my vpn :
#!/bin/bash
nmcli connection up MyVPN
I have already tested it, and it works if I launch it manually, but if I use crontab to launch it to a specific time it seems it doesn't work.
I stored the script in /home/MyUser/Scripts... |
It's because your shell uses environment variables that have different values then the environment variables that cron job have. Not all of the environment variables have different values but some of them. In not familiar enough with nmcli but you have to find out what environment variables it uses and then set them o... | Crontab and NMCLI |
1,466,434,613,000 |
The below nmcli command to connect to WiFi doesn't connect if it has more than one word as ssid name?
nmcli device wifi connect my homewifi password mypass
NOTE:
SSID name: my homewifi (bad since is has 2 words)
SSID name: my (good since only has 1 word)
Connecting with one word ssid name... |
If there are spaces in the command line, you should use quotes:
nmcli device wifi connect "my homewifi" password mypass
This will let the shell and nmcli know that this is to be considered as one word.
| nmcli command takes only first string of ssid? [closed] |
1,466,434,613,000 |
On Ubuntu 18.04. I upgraded my ProtonVPN CLI client from 2.2.6 to 3.7.2, which was a gigantic mistake. In troubleshooting the resulting issues, ProtonVPN support has asked me to delete connections related to ProtonVPN, but they haven't been able to tell me how.
These are my connections:
$ nmcli d
DEVICE TYPE... |
You have listed the output of nmcli d which lists the managed devices. However, you are trying to delete connections which are a different item for nmcli. From the man-page:
NetworkManager stores all network configuration as "connections", which are collections of data (Layer2 details, IP addressing, etc.) that descr... | How do I delete ProtonVPN connections with Network Manager? |
1,466,434,613,000 |
1.) I would like to get the actual name of an interface from the connection name used by nmcli.
In my case, I have several VPN-connections, let's call one of them my-vpn.
Now, I do nmcli con up id my-vpn and the VPN-connection is started and is assigned an actual interface name, let's say tun0.
Specifically, I want to... |
You can use nmcli together with ip to obtain the interface name from the connection name by matching on the IPv4 address:
ip -br addr show to "$(nmcli -g ip4.address con show <connection-name>)" | cut -d ' ' -f 1
| nmcli get actual name of interface (e.g. tun0) from connection name |
1,466,434,613,000 |
Almost everything is in the title ... I want to set up a Wi-Fi hotspot using only nmcli (no hostapd etc...) I'm doing this to create the hotspot (a small bash script):
#!/bin/sh
VAR_HOTSPOT="TEST"
nmcli con add type wifi ifname wlan0 con-name $VAR_HOTSPOT autoconnect yes ssid Hotspot-$VAR_HOTSPOT
nmcli con modify $VAR... |
Use iw tools for this:
iw wlp3s0 |grep -i mcast_rate
Example:
iw dev wlan0 set mcast_rate 300000
Confirm changes with:
iw wlan0 info
or
nmcli connection show "Hotspot-$VAR_HOTSPOT"
| How do I set up a hotspot 802.11n with nmcli? |
1,466,434,613,000 |
How can I get the uuid of eth0 connection out of the output of nmcli -p c using grep?
Output of nmcli -p c:
$ nmcli -p c
======================================================================================================================
Connection list
===========... |
Use nmcli's parameters:
nmcli -t -f uuid c
| Using grep to get UUID |
1,509,563,250,000 |
In the past this command has worked well for me, when disconnecting from a network without turning off my wifi interface:
nmcli con down id MyWifiName
When I run it now I'm getting:
Error: 'MyWifiName' is not an active connection.
Error: no active connection provided.
I might not be connected via nmcli.
Is there ano... |
I ended up finding the source of this issue by running nmcli c which returned a list of all the available wifi connections.
The connection I was on was highlighted in green with the name MyWifiName 2. For some reason the list included duplicates of my wifi network MyWifiName, MyWifiName1, and MyWifiName2.
So I tried ... | Can't disconnect with nmcli |
1,509,563,250,000 |
What's wrong with this command:
nmcli c up uuid "$nmcli -t -f uuid c"
How can I fix it?
"$nmcli -t -f uuid c" is a uuid needed after nmcli c up uuid.
|
nmcli c up uuid "$(nmcli -t -f uuid c)"
Use backticks or $(cmd) for commmand substitution
Note that nmcli -t -f uuid c can print out more than one uuid. I didn't test it yet, but the command above might not work then. If so, you should make sure that you are using the right uuid like that:
nmcli c up uuid `nmcli -t... | Using a string parameter in terminal |
1,509,563,250,000 |
I've seen how one can connect to a hidden wifi network using the following:
nmcli c add type wifi con-name $ssid ifname $adapter ssid $ssid
nmcli con modify $ssid wifi-sec.key-mgmt wpa-psk
nmcli con modify $ssid wifi-sec.psk $password
nmcli con up $ssid
In the code above the connection name is being set the same name... |
When using nmcli with device wifi connect, try setting the hidden option to yes.
Excerpt from the manual[1]:
wifi connect (B)SSID [password password] [wep-key-type {key | phrase}] [ifname ifname] [bssid BSSID] [name name] [private {yes | no}] [hidden {yes | no}]
Connect to a Wi-Fi network specified by SSID or BSSID... | Network manager connect to hidden network - specify password - not authentication type |
1,509,563,250,000 |
I'm watching online lectures on the nmcli utility (NetworkManager, Red Hat), and the instructor conveniently uses the package bash-completion to figure out what options are available after each argument. The problem is, I cannot use bash-completion (why not? that's a different issue). So instead, I've been trying to... |
The output of nmcli con add help goes to standard error, bypassing standard output. Your less command is left paging an empty stream.
It should work the way you expect if you redirect stderr to stdout:
nmcli con add help 2>&1 | less
| How to do paging on nmcli help? |
1,509,563,250,000 |
I wrote a combination .sh and .exp scripts that:
activate vpn connection
connect to remote server
download some files from server
deactivate vpn connection
This scripts should run on schedule.
I use nmcli for activate and deactivate connections.
If I run scripts manually it work correctly, but if I run this scripts ... |
Thanks @woodin for advice (after 8 months I returned to this question)!
What I did.
Firstly I compared outputs of nmcli general permissions launched from terminal and from cron.
From terminal (permissions for me)
PERMISSION VALUE
org.freedesktop.NetworkManager.ch... | nmcli Error: Connection activation failed: Not authorized to control networking |
1,509,563,250,000 |
Where does nmcli and iwlist stored the cached list seen access points: in a common file or in volatile memory?
|
Quickly looking at the nmcli source code ($ apt-get source network-manager) it seems the structure containing the AP informations (src/devices/wifi/nm-wifi-ap.c) is stored on volatile memory (I am not sure if the structure is malloced or statically allocated but I would go for the former).
The structure is this one (a... | Where is the list of access points stored? |
1,509,563,250,000 |
I can connect to a hidden network knowing the SSID that the router/hotspot has set:
CONNECTION_NAME=hidden-wifi
INTERFACE=wlp0s20u1
nmcli con add type wifi ifname $INTERFACE con-name $CONNECTION_NAME ssid $SSID
nmcli con modify 802-11-wireless.bssid $CONNECTION_NAME
nmcli -p con up id $CONNECTION_NAME
It is not possi... |
You always need an SSID. A hidden network is not a network without SSID, it's a network that doesn't broadcast it's SSID (unless solicitated).
You don't need anything special with hidden Wi-Fi networks.
| How to connect to a hidden network with nmcli? |
1,509,563,250,000 |
I use to connect to add a connection with nmcli on Ubuntu with
nmcli con add
It appears that those options have disappeared on the Linux Mint 17 nmcli version:
# nmcli con help
Usage: nmcli connection { COMMAND | help }
COMMAND := { list | status | up | down | delete }
My version of nmcli is
# nmcli -v
nmcli tool, ... |
Why does nmcli on linux Mint 17 differ from nmcli on recent Ubuntu versions?
Because Linux Mint 17 use the nmcli 0.9.8.8 version and Ubuntu 16.04 and linux mint 18 use the 1.2.2 version.
Where can I find the nmcli features that I had with Ubuntu on Linux Mint?
You should upgrade your distro to linux mint 18 , Or y... | Nmcli different on Linux Mint 17 than Ubuntu 16.04 |
1,509,563,250,000 |
I believe "airplane mode" on various applets is equivalent to nmcli radio wifi off. What is its equivalence when we use dhcpcd/wpa_supplicant? pkill wpa_supplicant?
|
NetworkManager (and its nmcli CLI command) calls a lower level API in the end. As this has nothing to do with dhcpcd and not much to do with wpa_supplicant, if you're not using NetworkManager, you can still (install the adequate package and) use as root the rfkill command.
To list the status of all available RF device... | airplane mode in wpa_supplicant |
1,509,563,250,000 |
I have a script in which I need to parse the IP address of the localhost, and replace the 2nd octet with a different value, but the value being substituted depends on what the value currently is...
For example, if the IP is 10.10.100.6, then I need the result to be 10.20.100.6, and if the IP is 10.20.100.6, then I nee... |
Just add t;.
sed -e 's/^10\.10\./10.20./;t;s/^10\.20\./10\.10\./'
It branches to the end on success.
But you should really merge all these grep, awk, sed into a single awk.
| Regex pattern to replace multiple values via sed |
1,509,563,250,000 |
I'm facing an issue where nmcli stops working on a custom rockchip controller.
When running nmcli dev wifi, I get no results so I had to start using iwlist scan. Is there something similar for nmcli d wifi connect?
I keep getting back No network with SSID '2KLIC Guests' found with nmcli.
This is the script I want to... |
You can connect through wpa_supplicant command , create a wpa_supplicant.conf file through wpa_passphrase command then connect:
touch /etc/wpa_supplicant/wpa_supplicant.conf
echo ctrl_interface=/run/wpa_supplicant > /etc/wpa_supplicant/wpa_supplicant.conf
echo update_config=1 >> /etc/wpa_supplicant/wpa_supplicant.conf... | Connect to WEP/WPA without nmcli? |
1,509,563,250,000 |
I am looking for a single command that switches airplane mode on/off. Actually I want to manipulate my fn+f10 key to switch airplane mode. I tried to add custom shortcut from gnome settings but it only allows one command. I know that nmcli radio wifi off works fine but I need to enter two commands to turn it on/off. I... |
You can use rfkill:
alias airplane-toggle="rfkill list | grep -q '\byes\b' && rfkill unblock all || rfkill block all"
| A command to switch airplane mode in gnome? |
1,509,563,250,000 |
I am trying to use nmcli to edit an existing connection and I would like to remove completely some properties (as opposed to just modifying their value).
Specifically the properties are wifi-sec.key-mgmt and wifi-sec.psk and the use case is because the network has been switched to open mode from wpa-psk mode.
I can't ... |
Provided the property is not a flag or container-type (if it is, use the nmcli c modify conid -setting.property value syntax you describe) then the nmcli man page specifies to set the property value to an empty string to reset it to defaults:
nmcli con modify id setting.property ""
You can also use the 'remove' keywo... | Deleting a connection property with nmcli |
1,509,563,250,000 |
nmcli d wifi list ifname wlan0 - I understand that this command returns a list of avaible networks for wlan0, but what exactly does the "d" do in the command? Because "nmcli wifi list ifname wlan0" doesn't work. If someone could break this down I would greatly appreciate it.
|
It means device as per --help:
d[evice] devices managed by NetworkManager
| What does the d do in "nmcli d wifi list ifname wlan0" |
1,509,563,250,000 |
nmcli proposes a connection type olpc-mesh.
How does it differ from ad hoc networking and in which situation is this connection type used?
From man nmcli:
type olpc-mesh ssid SSID [channel 1-13] [dhcp-anycast MAC]
ssid
SSID.
channel
channel to use ... |
olpc-mesh is a wireless mesh network developed by the MIT for the One Laptop per Child project. Citing Wikipedia:
An MIT Media Lab project has developed the [OLPC which] uses mesh networking (based on the IEEE 802.11s standard) to create a robust and inexpensive infrastructure. The instantaneous connections made by t... | What is the purpose of olpc-mesh connection in nmcli |
1,509,563,250,000 |
I'm trying to configure NetworkManager to perform the following action for an interface
ip route add ::/0 dev he-ipv6
he-ipv6 is a point-to-point ipv4 sit mode tunnel and running the above command directly works. Unfortunately when the device is rebooted the default gateway is not reconfigured and therefore all IPv6... |
In the end I found it cleanest to create a very simple networkmanager(8) dispatcher.d script to add the route when the interface comes online:
/etc/NetworkManager/dispatcher.d/99-he-ipv6-add-default-route
#!/bin/bash
[[ "${1}" -ne "he-ipv6" ]] && exit
if [[ "${2}" -eq "up" ]]; then
ip route add ::/0 dev he-ipv6
f... | Add default route without gateway nmcli |
1,509,563,250,000 |
I'm using 3 NetworkManager connection profiles in a Linux distribution and all the connection profiles refer to the same ethernet interface: enp3s0. I'm using these connections to manage:
the default static IP configuration
set a new static IP configuration
request a DHCP address
In the rest of the question I'll use... |
I have found the problem: to set correctly the default configuration I need to execute the nmcli con up command as showed below:
nmcli con up "ethernet_default_ipstatic" iface enp3s0
as also indicated in this post.
Note. In this moment for me is not important to know why the execution of the script init_connections.s... | Multiple NetworkManager connection profiles for the same ethernet interface not always work correctly |
1,509,563,250,000 |
Today I ran nmcli device show and its showing lot of tun interfaces on my machine.
Also device name is not familiar to me like as0t0 other than eth0 and wl0.
Can I check who is using them. also is it save to remove them.
GENERAL.DEVICE: as0t0
GENERAL.TYPE: tun
GENERAL.... |
From my discussion the comments:
these are tun sockets of the OpenVPN server.
| why there are lot of tun interfaces on my ubuntu 20.04 machine |
1,509,563,250,000 |
I'm building some code on java to disconnect the wifi in case theres an active wifi connection
To disconnect the wifi connection i use:
nmcli con down id [SSID NAME]
But i need the command to check if theres an active connection an if so, i need the name of the SSID Active wifi connection
|
You can see the active connections with this command
nmcli con show --active
It will show you if there's an active wifi or ethernet connection, if there's no wifi type displayed then there's no active wifi connection.
| check with nmcli device wifi if there's an active connection |
1,509,563,250,000 |
What is the correct way, with a single command or a small polkit addition, to limit all unprivileged users to read-only usage of nmcli?
Edit: Allowing only a privileged unix group, in addition to root, such as 'netadmins', would also be nice. The main issue, however, is blocking all non-read-only changes by general un... |
Apparently we get to write Javascript. Isn't that fun?
I think this will work:
# /etc/polkit-1/rules.d/10-disable-networkmanager.rules
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0)
{
return polkit.Result.NO;
}
});
https://doc.opensuse.... | The *correct* way to require root for changes via nmcli to NetworkManager |
1,509,563,250,000 |
Set up/configuration:
I have a RHEL 8 server, running Asterisk 15.x, that has 2 NICs. NMCLI is used for networking
NIC0 (eno5np0) is on the trusted network and is configured as a static IPv4 and NIC1 (ens1f0) is on the untrusted side as a DHCP IPv4. Both are UP,BROADCAST,RUNNING,MULTICAST
NIC0 is where I access the se... |
A gateway with a genmask of 0.0.0.0 is a "default gateway". In other words, it means "unless otherwise specified, the rest of the world is this way." In a simple multi-homed host configuration, there should be just one default gateway in the entire system at a time. You cannot really use two NATted internet connection... | RHEL 8 IP/Kernel Routing Multi-Homed Server Issue - Cannot get a response to ping, when trying to ping from 2nd Interface |
1,626,714,503,000 |
I recently installed Linux Mint 19.1 (Tessa) on a desktop with a wired connection behind a highly restrictive (ingress and egress) firewall. The only way to the Internet is through a proxy server that is allowed to transit the aforementioned firewall. I understand that Linux Mint 19.1 (Tessa) is derived from Ubuntu ... |
The workaround is to disable NetworkManager's Connectivity Check:
sudo nano /usr/lib/NetworkManager/conf.d/20-connectivity-ubuntu.conf
Change from the following:
uri=http://connectivity-check.ubuntu.com/
to the following:
#uri=http://connectivity-check.ubuntu.com/
-> Ctrl + o -> Enter -> Ctrl + x
sudo shu... | Linux Mint - Gnome Maps and Connectivity Check |
1,626,714,503,000 |
My raspberry Pi is on a robot and I don't have (or hope not to be forced to install) any graphical interface. So I want to us nmcli. I've been trying to get the right incantation, maybe someone can save me time.
Our internal wifi network at Brandeis University requires MSCHAPv2 for Phase 2, our domain is brandeis.edu,... |
Have you tried nmtui? That is more interactive, but still works over a ssh connection.
| nmcli command for Wifi with MSCHAPv2 on Ubuntu 20.04 server on Raspi |
1,626,714,503,000 |
I know that by the execution of the command:
nmcli con show
I get the list of all connection profiles present in the Linux system. For example if I execute the previous command in my Linux Mint system I obtain:
$ nmcli con show
NAME UUID TYPE DEVICE
lan0 ... |
Use it with -g (or --get-values) to print only the values for the NAME field:
nmcli -g NAME con
| Option for nmcli command to get only the name of the NetworkManager connection profiles |
1,626,714,503,000 |
I am trying to modify the ethernet device name without modifying grub. I have tried to modify the device name, but when I do, the device stops working.
Things I have tried:
I've tried this
nmcli con edit id "Wired connection 1"
set connection.id testname
save
quit
I've also tried this:
nmcli connection modify ens... |
Changing the name of my network interface caused my mac address to change, therefore it would fail at the mac layer. By hardcoding the mac address into the /etc/sysconfig/network-scripts/ifcfg-testname file using the HWADDR directive, then the interface name change would work just fine; (It failed when I used the MACA... | RHEL 8 - How can I modify an ethernet device name? |
1,626,714,503,000 |
I own a USB WiFi device which works well, until I try to connect to anything encrypted.
I want to use this USB device as an AP, ideally with nmcli. How do I do so?
All the sources I've found, show clearly, how can I create a (WPA or WPA2) encrypted AP. I have found nothing to create an AP without any encryption.
Goog... |
To create an open AP, you need to set wifi-sec.key-mgmt to none:
sudo nmcli connection add type wifi ifname $WIFI_INTERFACE con-name $AP autoconnect yes ssid $AP
sudo nmcli connection modify $AP 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
sudo nmcli connection modify $AP wifi-sec.key-mgmt none
s... | How can I set up a password-less AP with nmcli? |
1,626,714,503,000 |
Working with VirtualBox 6.1.38 and Fedora Server 36 as the guest, about to define a static ip address, I am reading many tutorials about how to do this, the nmcli command is involved.
Something cumbersome is that the UUID shown through the sudo nmcli connection show command must be used later for the following command... |
I did realize the following, the sudo nmcli connection show command shows the NAME header too, it such as enp0s3, therefore the following commands
sudo nmcli connection modify <UUID> IPv4.address 192.168.1.X/24
sudo nmcli connection modify <UUID> IPv4.gateway 192.168.1.1
sudo nmcli connection modify <UUID> IPv4.dns <s... | Define permanent static ip at fedora server 36 without nmcli command |
1,626,714,503,000 |
Is it possible to set a max number of clients on an ethernet-interface created with nmcli?
Example: I would like max 2 devices to get a successful connection, even if I add a network-switch and connect 10 devices.
|
That's not how Ethernet works; there's no "connections" in ethernet; that's a concept from two layers higher.
So, you could try to make a firewall behave in a way that limits specific kind of activity, e.g. the ability to send TCP/IP packets, to a certain number of IP addresses. This would probably mean writing a daem... | nmcli: limit number of active connections |
1,626,714,503,000 |
I am installing Arch and the question comes in this simple command.
pacstrap /mnt ... networkmanager
I am using my laptop with wireless connection. After installing arch linux I am going to use nmcli to connect to wifi. Do I need to install wpa_suppliciant and wireless_tools or it'not necessary if you're using nmcli... |
Do I need to install wpa_suppliciant and wireless_tools or it'not necessary if you're using nmcli?
wireless_tools isn't required.
nmcli is used to configure wpa_supplicant. wpa_supplicant is necessary to connect to a protected WPA* wifi.
iwd (iNet wireless daemon) is an alternative to wpasupplicant.
| Do I need wpa_suppliciant and wireless_tools if I use nmcli to connect to wifi? |
1,626,714,503,000 |
For a home-server I'm using the following nmcli configuration to spawn hotspot and ethernet connections on 192.168.1.50:
nmcli con add con-name WIFICON \
type wifi ifname wlp2s0 mode ap autoconnect yes \
ip4 192.168.1.50/28 gw4 192.168.1.50 ipv4.method shared \
ssid MYWIFI \
wifi-sec.key-mgmt wpa-psk w... |
The two connections should have different IP addresses if they are to be active at the same time. Then, you might indeed need bridging for example if you want to use the wifi as an AP and offer Internet access to clients by routing traffic through ETHCON (enp3s0).
| nmcli hotspot not working when ethernet connected |
1,626,714,503,000 |
I'm working on an embedded device running Ubuntu 14.04.
When I first logged in I had no problem using nmcli dev wifi and it would return 3 results. (Though the wifi card must be weak as my laptop returns over 20 results.)
I then used:
nmcli nm wifi off
rfkill unlock wlan
Followed by running a wifi AP with hostapd, wh... |
I was able to work around the problem by using iwlist scan instead of nmcli dev wifi.
Somewhat related information but not specific to interfaces:
https://unix.stackexchange.com/a/50099/16792
| Advice for debugging a network interface? |
1,626,714,503,000 |
I am new to linux and was trying to configure me system, I wanted to use https://github.com/ericmurphyxyz/rofi-wifi-menu, but saw it was not showing any connections.
When I enter nmcli I get this
lo: connected (externally) to lo
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
inet4 12... |
Turns out I had another network manager running, , I simply uninstalled ifupdown and removed ifupdown from plugins in network manager config file:
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
| nmcli not showing connections |
1,626,714,503,000 |
I have set up a chroot environment (Ubuntu Jammy). I need to run the nmcli command for some purposes. nmcli depend on NetworkManager.service, but the systemd service isn't allowed in chroot env.
How to make nmcli commands available in chroot?
|
NetworkManager can be executed with --no-daemon option in background, making the nmcli to work independently of the systemd service :
/usr/sbin/NetworkManager --no-daemon &
| Run nmcli commands in chroot environnement |
1,357,754,399,000 |
I wander how to disable event sounds in kde5 Plasma (the one that is heard when scrolling the volume in systray for example).
I use Plasma in Opensuse 13.2 but this is KDE specific methinks.
UPDATE
These are the available settings (after answer):
|
In recent Plasma 5, search "Audio Volume" in the application launcher and, under 'Applications' tab, disable 'Notification Sounds'.
In some Plasma versions the above doesn't work, as I now see in Kubuntu 17.10. The Audio Volume tool looks different and notifications sounds is already muted.
To stop the volume scrol... | How to disable event sounds in Plasma 5? |
1,357,754,399,000 |
Using the command line, I'd like show a notification on every running X display. ( and running console )
Something like:
notify-send-all 'Warning' 'Nuclear launch in 5 minutes, please evacuate'
Is there a program that will do this? If not, can this be implemented with bash?
|
You can send a message to all consoles with the command wall.
For sending notifications under X there is notify-send which sends a notification to the current user on the current display. (From your question, I guess you already know this one.) You can build upon this with some bash scripting. Basically you have to f... | Show a notification across all running X displays |
1,357,754,399,000 |
notify-send keeps showing notification for a few second. its option -t specifies the timeout in milliseconds at which to expire the notification.
Can I send a notification which will last until I tell it to end, e.g. by clicking it?
|
Yes, if you use notify-send -u critical -t 0 the notification will stay on the screen until you click it.
It's unfortunate that the man page doesn't mention this.
| Is there a desktop notification that stays shown until I click it? |
1,357,754,399,000 |
Notifications doesn't work on Linux standalone window managers (Openbox, Awesome WM and alike). I tried to install notification-daemon and dunst, but sending with notify-send "something" does not make any window to pop-up.
I tried to run polkit-gnome-agent and run directly notification daemons, but it does not help (w... |
Finally I solved problem myself.
I will leave instructions what I did.
The problem consists of two parts:
Dbus cannot be accessed from within windows manager
Notification daemon cannot get messages from dbus
1st problem solution:
Real problem was, that my windows manager was run from lxdm, which for some reason does... | Notifications and notification daemon not working on window manager |
1,357,754,399,000 |
I use Linux Mint 13 MATE, and I'm trying to set up notifications when I plug/unplug devices.
First of all, I found udev-notify package, but unfortunately it almost doesn't work for me: it works for very little time (1-2 minutes), and then, if I connect/disconnect any device, it crashes:
Traceback (most recent call las... |
Well, after many hours of googling and asking on forums, I got it working (it seems). Anyone who wants to get nice visual and/or audio notification when some USB device is plugged/unplugged can install my script, see installation details below.
First of all, answers on my own questions.
1. How to get actual title of t... | Call notify-send from an udev rule |
1,357,754,399,000 |
I have installed KDE Plasma on my arch Linux but the notifications seems like XFCE4 (i also have XFCE4 installed on my Arch).
The notification configurations says: Currently the notifications are provided by Xfce Notify Daemon instead of Plasma.
Have KDE Plasma his own notification system?
How can i get this?
|
KDE Plasma does indeed have its own notification system, but it conflicts with the one from XFCE, which is what the dialog box is telling you.
If you do not use XFCE4 anymore, you can uninstall the xfce4-notifyd package which provides the XFCE nofications.
If you do still use XFCE4, but want to prioritize the KDE Plas... | Wrong notification system in KDE Plasma |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.