Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
2339
views
Is it possible to give alias name to ip address with port number in CentOS 7
I have one question regarding given alias to ip address with port number. For example I am executing jenkins in my local system in port number 8080 and nexus in port number 8081. I will accessing GUI by typing address manually as below. For jenkins: `192.168.122.1:8080` For Nexus: `192.168.122.1:808...
I have one question regarding given alias to ip address with port number.
For example I am executing jenkins in my local system in port number 8080 and nexus in port number 8081.
I will accessing GUI by typing address manually as below.
For jenkins:
192.168.122.1:8080
For Nexus: 192.168.122.1:8081
Instead of following above process it is possible to alias names as below.
192.168.122.1:8080
-> jenkins.world
192.168.122.1:8081
-> nexus.world
or alias as below.
192.168.122.1:8080
-> go/jenkins
192.168.122.1:8081
-> go/nexus
Can you please check and advice about the feasibility of above type of alias in CentOS 7.6 OS.
Bitra Hemanth
(21 rep)
Jun 20, 2019, 05:35 AM
• Last activity: Aug 5, 2025, 09:10 AM
2
votes
1
answers
14724
views
How to SSH on alphine linux with iSH on ipad?
Iam trying out linux on Ipad through the iSH app, however, i cant seem to find my username it always returns 'root' when i do whoami. So now iam confused how I can ssh into another computer or even how to ssh into my ipad, as Ive tried multiple commands to find my ip on the ipad however it just does...
Iam trying out linux on Ipad through the iSH app, however, i cant seem to find my username it always returns 'root' when i do whoami. So now iam confused how I can ssh into another computer or even how to ssh into my ipad, as Ive tried multiple commands to find my ip on the ipad however it just doesnt work.
e.g I try ifconfig -a but its shows /proc/net/dev: No such file or directory.
curl ifconfig.me works for the public ip, but i need the host ip for ssh which doesnt show me.
Another example :
Mathewss-iPad:~# hostname -I
hostname: unrecognized option: I
BusyBox v1.31.1 () multi-call binary.
Usage: hostname [OPTIONS] [HOSTNAME | -F FILE]
Get or set hostname or DNS domain name
-s Short
-i Addresses for the hostname
-d DNS domain name
-f Fully qualified domain name
-F FILE Use FILE's content as hostname
issues:
Can't SSH into our out to any devices because:
1. Cant find hostname just 'root'
2. Cant retrieve host ip address
3. But everything works as normal in linux apk installing packages, making folders, changing directories etc.
Mj _
(21 rep)
Sep 14, 2021, 09:30 AM
• Last activity: Jul 23, 2025, 02:03 AM
0
votes
1
answers
5383
views
How to find link-local address of the other device?
What command can I use to find the link-local address of the device I am connected to? I am connected to the other device via link-local ONLY so entering its normal IPv4 address no longer works. ```ip list``` does not help either because it only shows my ip address. I am using Ubuntu 22.04 LTS.
What command can I use to find the link-local address of the device I am connected to? I am connected to the other device via link-local ONLY so entering its normal IPv4 address no longer works.
list
does not help either because it only shows my ip address. I am using Ubuntu 22.04 LTS.
sted5453
(1 rep)
Nov 6, 2022, 11:22 AM
• Last activity: Jun 10, 2025, 07:03 PM
1
votes
2
answers
2821
views
Cannot ping second IP address on another machine's interface
I have an OpenVPN client connected to an OpenVPN server. The server has the following routes: default via 10.109.185.65 dev eth0 proto dhcp src 10.109.185.84 metric 100 10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1 10.109.185.64/27 dev eth0 proto kernel scope link src 10.109.185.84 10.10...
I have an OpenVPN client connected to an OpenVPN server.
The server has the following routes:
default via 10.109.185.65 dev eth0 proto dhcp src 10.109.185.84 metric 100
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1
10.109.185.64/27 dev eth0 proto kernel scope link src 10.109.185.84
10.109.185.65 dev eth0 proto dhcp scope link src 10.109.185.84 metric 100
The client has the following address on the
tun0
virtual interface created by OpenVPN:
11: tun0: mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.3/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::3c55:91d1:e8cf:7c55/64 scope link flags 800
valid_lft forever preferred_lft forever
From the server, I can ping the client by doing ping 10.8.0.3
and it works fine.
Then I added a second IP address to tun0
on the client by doing ip addr add 10.100.1.2/24 dev tun0
. It shows up on the tun0
interface as:
inet 10.100.1.2/24 scope global tun0
valid_lft forever preferred_lft forever
On the server, I added a route for that subnet by doing ip route add 10.100.1.0/24 dev tun0
. It shows up in the route list as:
10.100.1.0/24 dev tun0 scope link
But trying a ping 10.100.1.2
on the server failed.
Then I noticed that both the server and client had the following iptables FORWARD rule:
ACCEPT all -- 10.8.0.0/24 anywhere
So I added another FORWARD rule for the 10.100.1.0 subnet by doing iptables -A FORWARD -s 10.100.1.0/24
on both the server and client.
But trying a ping 10.100.1.2
on the server still fails.
Is there anything else I need to do in order to be able to ping 10.100.1.2 from the server?
pacoverflow
(278 rep)
Aug 22, 2020, 02:04 AM
• Last activity: Apr 22, 2025, 03:05 AM
7
votes
2
answers
13493
views
Return the private IP of an EC2 instance from within the EC2 instance
What specific syntax can be used to return the private IP address of an Amazon Linux EC2 instance from the command line within that instance? So far, I have come up with the following: # Get private IP from inside the instance by filtering inside the following: instanceid=$(curl http://169.254.169.2...
What specific syntax can be used to return the private IP address of an Amazon Linux EC2 instance from the command line within that instance?
So far, I have come up with the following:
# Get private IP from inside the instance by filtering inside the following:
instanceid=$(curl http://169.254.169.254/latest/meta-data/instance-id)
echo $instanceid
aws ec2 describe-instances --instance-id $instanceid --region us-west-2
However, as you can see if you type these commands inside an EC2 instance yourself, the above 3 lines result in a massive output, which would be a mess to filter through manually.
Can someone suggest one or two lines of code to return simply the private ip of the instance and NO other information?
CodeMed
(5357 rep)
Jun 8, 2019, 12:49 AM
• Last activity: Apr 9, 2025, 01:38 PM
0
votes
1
answers
584
views
WGet fails to download with an IPv6 address
When I try to download something with WGet, usually it fails if the domain name is translated to an IPv6 address. That happens more often when there's a link redirection. For example: $ wget --inet6-only https://raw.githubusercontent.com/walkxcode/Dashboard-Icons/main/png/ebay.png --2022-11-13 10:27...
When I try to download something with WGet, usually it fails if the domain name is translated to an IPv6 address.
That happens more often when there's a link redirection.
For example:
$ wget --inet6-only
--2022-11-13 10:27:05--
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8000::154, 2606:50c0:8003::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443...
---
$ wget --inet6-only https://download.docker.com/linux/centos/9/x86_64/stable/Packages/docker-ce-20.10.21-3.el9.x86_64.rpm
--2022-11-13 10:32:52-- https://download.docker.com/linux/centos/9/x86_64/stable/Packages/docker-ce-20.10.21-3.el9.x86_64.rpm
Resolving download.docker.com (download.docker.com)... 2600:9000:21ed:e000:3:db06:4200:93a1, 2600:9000:21ed:2e00:3:db06:4200:93a1, 2600:9000:21ed:7000:3:db06:4200:93a1, ...
Connecting to download.docker.com (download.docker.com)|2600:9000:21ed:e000:3:db06:4200:93a1|:443...
In the first example, the
--2022-11-13 10:28:16--
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24872 (24K) [image/png]
Saving to: ‘ebay.png’
ebay.png 100%[==================================================================================>] 24.29K --.-KB/s in 0.005s
2022-11-13 10:28:16 (4.48 MB/s) - ‘ebay.png’ saved [24872/24872]
---
$ wget --inet4-only https://download.docker.com/linux/centos/9/x86_64/stable/Packages/docker-ce-20.10.21-3.el9.x86_64.rpm
--2022-11-13 10:34:35-- https://download.docker.com/linux/centos/9/x86_64/stable/Packages/docker-ce-20.10.21-3.el9.x86_64.rpm
Resolving download.docker.com (download.docker.com)... 52.84.83.27, 52.84.83.65, 52.84.83.79, ...
Connecting to download.docker.com (download.docker.com)|52.84.83.27|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21654080 (21M) [binary/octet-stream]
Saving to: ‘docker-ce-20.10.21-3.el9.x86_64.rpm’
docker-ce-20.10.21-3.el9.x86_64.rpm 100%[==================================================================================>] 20.65M 27.3MB/s in 0.8s
2022-11-13 10:34:36 (27.3 MB/s) - ‘docker-ce-20.10.21-3.el9.x86_64.rpm’ saved [21654080/21654080]
Why is WGet failing with IPv6?


raw.githubusercontent.com
name is resolved to 2606:50c0:8001::154, 2606:50c0:8000::154, 2606:50c0:8003::154
. Then, WGget tries to connect to this IP and nothing else happens, just freezes. No download is made.
The same happens to the second example, download.docker.com
.
When I force an IPv4 connection, it downloads the content successfully.
$ wget --inet4-only 

markfree
(425 rep)
Nov 13, 2022, 01:45 PM
• Last activity: Feb 1, 2025, 11:40 AM
0
votes
1
answers
44
views
Can't configure port forwarding
This morning I tried to set up port forwarding on a machine I have on another network, in order to allow SSH access. The relevant config page requires these fields (translating from italian [here's the original screenshot](https://risorse.tim.it/content/dam/flytoco-areapubblica-aemfe/tim_it/assisten...
This morning I tried to set up port forwarding on a machine I have on another network, in order to allow SSH access.
The relevant config page requires these fields (translating from italian [here's the original screenshot](https://risorse.tim.it/content/dam/flytoco-areapubblica-aemfe/tim_it/assistenza/assistenza-tecnica/guide-e-manuali/c8/C8_img_13.jpg)) to be filled:
Name: _________
Protocol: __________
Remote host IP address: ___.___.___.___ ~ ___.___.___.___
Host LAN: ___________
WAN port: ____ ~ ____
LAN host port: ____
Now, as far as I understand,
- Name
is unimportant and I can put anything I want in it,
- Protocol
should be TCP
- Host LAN
should be the IP that the device I want to connect to (a workstation connected to the router via Ethernet) was assigned
- WAN port
is the port I want to expose to the outside, e.g. 9022
,
- LAN host port
is 22
, for SSH
- Remote host IP address
is what puzzles me a bit, I initially thought I could do 192.168.1.1 ~ 192.168.1.255
, which should include the router.
Based on https://canyouseeme.org/ , the above settings are wrong, as the site can't see me on 9022
.
---
I also saw [this thread on an italian forum](https://forum.fibra.click/d/11544-apertura-porte-su-tim-hub/4) that suggests that ___.___.___.___ ~ ___.___.___.___
should be filled with the address of the router, which for me means 192.168.1.1 ~ 192.168.1.1
. The OP did not reply back asking more, so I presume the settings worked for them.
Enlico
(2258 rep)
Jan 18, 2025, 01:05 PM
• Last activity: Jan 18, 2025, 08:39 PM
1
votes
1
answers
708
views
Gateway failover using netplan
I'm having trouble setting up 2 IP address so that if one fails it will use the secondary IP address. I've setup netplan as shown in the picture. I can connect via ssh using both IP address, I test which IP address is the main one by using speedtest-cli, using the server control panel I disable the...
I'm having trouble setting up 2 IP address so that if one fails it will use the secondary IP address. I've setup netplan as shown in the picture.
I can connect via ssh using both IP address, I test which IP address is the main one by using speedtest-cli, using the server control panel I disable the IP address that was used by speedtest-cli. However, when I try to use speedtest-cli again it doesn't work, I expected it to automatically switch to the IP that is still available. I tried pinging known IP address but it doesn't work.
Does anyone know why this isn't working as I expect it to and how I can get it working? 
Arran Lawley
(11 rep)
Jun 13, 2019, 07:06 PM
• Last activity: Nov 29, 2024, 04:12 PM
1
votes
1
answers
78
views
How to get OpenVPN's remote peer external (real) IP address?
When connecting to an OpenVPN server I use an FQDN that may resolve into multiple IP addresses yet only one of them is chosen/used as long as the VPN session is alive. How can I get it? `ifconfig`, `route`, `ip a`, `ip l`, `ip r` don't have it. `journalctl -b | grep "UDPv4 link remote"` contains it...
When connecting to an OpenVPN server I use an FQDN that may resolve into multiple IP addresses yet only one of them is chosen/used as long as the VPN session is alive.
How can I get it?
ifconfig
, route
, ip a
, ip l
, ip r
don't have it.
journalctl -b | grep "UDPv4 link remote"
contains it but I don't want to use/parse journalctl
.
I'm connecting using NetworkManager's OpenVPN plugin.
Artem S. Tashkinov
(32730 rep)
Sep 1, 2024, 05:52 PM
• Last activity: Sep 1, 2024, 06:06 PM
1
votes
1
answers
1843
views
Assign IP range in centOS 7 to network interface
Helllo to all, I'm very new to server administration, so I have a big question for me. What is the best way to assign a ip range to the network interface on the server? - I found some examples but I think there should be a better way round. In the most articles they're describing to add a config fil...
Helllo to all,
I'm very new to server administration, so I have a big question for me.
What is the best way to assign a ip range to the network interface on the server? - I found some examples but I think there should be a better way round. In the most articles they're describing to add a config file for each ip address. I think this is not the best way.
Maybe you have some suggestions.
Examples:
https://www.100tb.com/community/knowledgebase/display/HOW/Adding+Multiple+IP+Addresses+in+CentOS+7
The main ip to access the server is:
123.123.123.38
I have also the following ip adresses:
123.123.123.39
123.123.123.40
123.123.123.41
123.123.123.42
What is the best way to add them to the network manager?
yfain
(133 rep)
Jun 5, 2018, 06:06 AM
• Last activity: Jul 1, 2024, 12:07 PM
2
votes
0
answers
120
views
Efficient way to get IPs attached to a specific interface by index / if_index
I am interested in getting the associated IPs with an interface, but by if_index, because all I actually have is an `ipi6_ifindex` from `IPV6_PKTINFO` / `IPV6_RECVPKTINFO`. I could use `getifaddrs` but, that would return `struct ifaddrs` which only has an `ifa_name` so I'd have to get the name and d...
I am interested in getting the associated IPs with an interface, but by if_index, because all I actually have is an
ipi6_ifindex
from IPV6_PKTINFO
/ IPV6_RECVPKTINFO
. I could use getifaddrs
but, that would return struct ifaddrs
which only has an ifa_name
so I'd have to get the name and do a bunch of string comparisons, and it is particularly expensive to boot.
I already have the ifindex
, so it feels like there should be an efficient way to get the addresses associated with the device. But I can't find any solution.
Charles Lohr
(133 rep)
Jun 7, 2024, 04:23 AM
2
votes
1
answers
469
views
Is there way to print IPv6 address selection precedence in command line?
I can print address' label via `ip addrlabel` and override label and precedence in `/etc/gai.conf`, but how to print current precedence in command line? In https://man7.org/linux/man-pages/man8/ip-addrlabel.8.html, it says > Precedence is managed by userspace, and only the label itself is stored in...
I can print address' label via
ip addrlabel
and override label and precedence in /etc/gai.conf
, but how to print current precedence in command line?
In https://man7.org/linux/man-pages/man8/ip-addrlabel.8.html , it says
> Precedence is managed by userspace, and only the label itself is stored in the kernel.
but how to print that?
In windows, I can simply type:
$ netsh int ipv6 show prefixpolicies
Querying active state...
Precedence Label Prefix
---------- ----- --------------------------------
50 0 ::1/128
40 1 ::/0
30 2 2002::/16
20 3 ::/96
10 4 ::ffff:0:0/96
5 5 2001::/32
How to do the same thing in Ubuntu?
Thanks.
chansey
(173 rep)
May 7, 2023, 08:00 PM
• Last activity: Feb 24, 2024, 01:38 PM
3
votes
1
answers
5696
views
Meaning of prefix length with ip addr add noprefixroute
When assigning an ip address to a network interface with `ip addr add noprefixroute`, what effect will the specified prefix length have? When `noprefixroute` is not used, the prefix length is used to automatically create and delete a route for the network prefix of the added address. Does it have an...
When assigning an ip address to a network interface with
ip addr add noprefixroute
, what effect will the specified prefix length have? When noprefixroute
is not used, the prefix length is used to automatically create and delete a route for the network prefix of the added address. Does it have any function other than that?
For example, what is the difference between
ip addr add noprefixroute 10.137.0.36/16 dev eth0
and
ip addr add noprefixroute 10.137.0.36/32 dev eth0
?
p0ny
(133 rep)
Feb 7, 2024, 04:39 PM
• Last activity: Feb 7, 2024, 08:24 PM
-1
votes
1
answers
3119
views
Find IP address of poe devices attached to my computer via ethernet
I'm currently trying to setup zoneminder on my computer that has Ubuntu as a host OS. Before I do all that, I want to know if the poe CCTV camera I purchased works, a Reolink RLC410-5MP There are multiple ways to achieve this but the simplest one I found was to use the rstp URL in VLC After searchin...
I'm currently trying to setup zoneminder on my computer that has Ubuntu as a host OS.
Before I do all that, I want to know if the poe CCTV camera I purchased works, a Reolink RLC410-5MP
There are multiple ways to achieve this but the simplest one I found was to use the rstp URL in VLC
After searching the correct format for the URL, this is what I found
> Main Stream: rtsp://admin:password@ip_address:554//h264Preview_01_main
What I need now is the IP address of the CCTV, which is connected directly to my laptop via an Ethernet cable and is being powered by a power supply
I'm not 100% sure how to find the IP address, one way I found is using
nmap -sn 192.168.0.0/24
However the above shows 8 devices connected and I'm puzzled as I should be only expecting one/two devices(the CCTV and maybe the router?)
What's the best way to find the IP address of a poe device physically attached to a laptop via an ethernet cable?
Sgr
(109 rep)
Jun 1, 2019, 07:03 PM
• Last activity: Aug 22, 2023, 11:05 AM
0
votes
2
answers
1525
views
Making a device accessible with SSH from another device over the internet
I'd like to run a Raspberry Pi, on which I'd like to log in with `ssh`, connected to my router. Then I would like to access it from another RPi, which is connected to another router with physical (and network) distance. I assume I need - a static IP for both RPis and the router. - `ssh` on both RPis...
I'd like to run a Raspberry Pi, on which I'd like to log in with
ssh
, connected to my router. Then I would like to access it from another RPi, which is connected to another router with physical (and network) distance.
I assume I need
- a static IP for both RPis and the router.
- ssh
on both RPis.
- a somehow stable internet connection and router.
Did I forget something?
How to set this up?
How to give my RPi a static IP address?
muggi
(759 rep)
Jun 21, 2023, 05:44 PM
• Last activity: Jun 27, 2023, 08:28 AM
0
votes
1
answers
353
views
Reachability of IP address of virtual machine
I have a virtual machine (Linux) installed in my PC (Windows) and I was wondering the reachability of the IP address assigned to the virtual machine. According to `ipconfig` on Windows and `ifconfig` on Linux: for the **host machine**: - IP address is 192.168.1.208 - subnet masking is 255.255.255.0...
I have a virtual machine (Linux) installed in my PC (Windows) and I was wondering the reachability of the IP address assigned to the virtual machine.
According to
ipconfig
on Windows and ifconfig
on Linux:
for the **host machine**:
- IP address is 192.168.1.208
- subnet masking is 255.255.255.0
for the **virtual machine**:
- IP address is 192.168.124.130
- subnet masking is 255.255.255.0
I was wondering how to make the virtual machine a part of the LAN so that other devices on the LAN can access it.
Update:
The issue is resolved after I changed the VM network adapter to **Bridged**.
Yiyang Yan
(27 rep)
Jan 17, 2023, 02:58 AM
• Last activity: Jun 9, 2023, 03:09 AM
1
votes
0
answers
77
views
Command “W” shows that my TTY and FROM are both “tty2”
I use dual boot windows and Ubuntu on a thinkpad T14 and in my terminal (in the Ubuntu graphical interface) command w shows that my TTY and FROM are both tty2 not sure how this is possible I understand how my TTY could be tty2 that all makes sense but the confusion is why my from is not displaying t...
I use dual boot windows and Ubuntu on a thinkpad T14 and in my terminal (in the Ubuntu graphical interface) command w shows that my TTY and FROM are both tty2 not sure how this is possible
I understand how my TTY could be tty2 that all makes sense but the confusion is why my from is not displaying the ip or host name of the user logged in
Owen
(11 rep)
Apr 6, 2023, 08:27 PM
1
votes
1
answers
56
views
Changed my IPv4 to ssh into OpenWRT on rpi2 - did dhclient on my host afterwards- Now I have two IPv4 on one NIC - and it works! How?
as described in the title, sorry I wanted to have a specific title and I could not get it specific and short and the same time, I did the following: 1. Flashed a SD Card with OpenWRT to test it on a Raspberry Pi. 2. OpenWRT has dhcp client disabled and puts a static IP in that image that does not co...
as described in the title, sorry I wanted to have a specific title and I could not get it specific and short and the same time, I did the following:
1. Flashed a SD Card with OpenWRT to test it on a Raspberry Pi.
2. OpenWRT has dhcp client disabled and puts a static IP in that image that does not correspond to my network IPv4 pattern.
3. So I changed my host IPv4 to 192.168.1.2 in order to connect to 192.168.1.1. That worked.
4. After logout I did dhclient on my host.
Now I have access to all my network devices as before and still can connect to that OpenWRT machine I described above. I only have one NIC on my host system. So I wonder how this can work?
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether *somevalue* brd ff:ff:ff:ff:ff:ff
inet 192.168.1.2/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet 10.88.88.80/24 brd 10.88.88.255 scope global dynamic eth0
valid_lft 863229sec preferred_lft 863229sec
inet6 XXX/64 scope global dynamic mngtmpaddr
valid_lft forever preferred_lft forever
inet6 XXX/64 scope global dynamic mngtmpaddr
valid_lft 7013sec preferred_lft 1613sec
inet6 XXX/64 scope link
valid_lft forever preferred_lft forever
superurmel
(49 rep)
Feb 18, 2023, 11:08 PM
• Last activity: Feb 19, 2023, 04:02 AM
2
votes
2
answers
1057
views
How does Apache webserver is able to detect CNAME
I was quite curious how does Apache web server can detect a subdomain even when all the subdomains point to same IP address, since my understanding is that an IP address that cannot have a subdomain, and every domain name ultimately resolve to an IP address. Example: example1.domain.com resolves to...
I was quite curious how does Apache web server can detect a subdomain even when all the subdomains point to same IP address, since my understanding is that an IP address that cannot have a subdomain, and every domain name ultimately resolve to an IP address.
Example:
example1.domain.com resolves to => 192.24.17.65 take you to => example1 webpage
example2.domain.com resolves to => 192.24.17.65 take you to => example2 webpage
satyamfifa
(23 rep)
May 2, 2021, 10:49 PM
• Last activity: Feb 7, 2023, 04:14 PM
0
votes
0
answers
451
views
How to add an additional temporary IP to the connection that currently provides internet via nmcli?
I need to add a specific IP to the interface that actively provides the internet connection, like so: ``` network_dev=$(nmcli --get-values DEVICE connection show --active | grep w) sudo ip a add 192.168.250.9/24 dev $network_dev ``` This address assignment should be temporary and should not be appli...
I need to add a specific IP to the interface that actively provides the internet connection, like so:
network_dev=$(nmcli --get-values DEVICE connection show --active | grep w)
sudo ip a add 192.168.250.9/24 dev $network_dev
This address assignment should be temporary and should not be applied between nmcli c up/down id "My connection"
Is there a way to perform this operation directly through nmcli
?
ceremcem
(2451 rep)
Dec 27, 2022, 06:48 PM
Showing page 1 of 20 total questions