Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ip-address]

The tag has no usage guidance.

1
vote
0answers
14 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 ...
1
vote
1answer
11 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 ...
0
votes
1answer
49 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 ...
0
votes
1answer
23 views

Symlinks with grub2 like pxelinux

I do want to do symlinks like pxelinux can, just with grub2. But I cant figure out how. The goal is to have different config-files which I can dynamicly pass to an IP. Grub2 does work so far but I ...
0
votes
0answers
22 views

Fetching the IP address on OS X Mojave

I used this command to fetch the IP address of my workstation (running OS X 10.14.5 ) in a script, but I am wondering if somebody out there/OS X has a better solution. ifconfig en0 | grep netmask | ...
1
vote
1answer
45 views

Why does “hostname -i” return “Unknown host”?

We have created an AWS EC2 instance using AMI type Amazon Linux AMI 2018.03.0.20190514 x86_64 HVM. After we started up the instance, our software printed out an IP address error. When we tried ...
1
vote
0answers
23 views

bc command unexpected results [duplicate]

I am trying to compare a decimal and it seems like bc is ignoring it. The OS is CentOS release 6.9 (Final) and bash is bash-4.1.2-48.el6.x86_64, below is the code #!/bin/sh i=32.39 IP_LOW_2=32.0 ...
2
votes
3answers
227 views

Use sed to replace IP address with hostname in log output

I am trying to replace an IP address in a dnsmasq logfile with its hostname. The logfile is being 'watched' with the command 'tail -f /var/log/dnsmasq.log' on the console and I want to pipe the output ...
2
votes
1answer
118 views

Which network interface or IP address in the guest OS corresponds to which in the host OS?

I heard that a guest OS and a host OS in KVM can communicate via having network interfaces or IP addresses in the same private network. I also heard that You can see its IP addresses and network ...
0
votes
1answer
65 views

What IP address(es) can't be bound to a listening socket?

What IP address(es) can't be bound to a listening socket? For example, can a server process bind 255.255.255.255 to a listening socket? Thanks.
7
votes
4answers
907 views

why `nmap 192.168.1.97` returns less services than `nmap 127.0.0.1`? [duplicate]

According to https://networkengineering.stackexchange.com/a/57909/, a packet sent to 192.168.1.97 "doesn't leave the host but is treated like a packet received from the network, addressed to 192.168.1....
0
votes
2answers
99 views

What does the action “loop back” mean? [closed]

I have some difficulty to picture a diagram for the meaning of loopback. https://en.wikipedia.org/wiki/Loopback#Virtual_loopback_interface Any traffic that a computer program sends to a loopback IP ...
0
votes
2answers
84 views

When does `[::]` or `0.0.0.0` mean this network and when this host? [duplicate]

Tanenbaum's Computer Networks says The IP address 0.0.0.0, the lowest address, is used by hosts when they are being booted. It means ‘‘this network’’ or ‘‘this host.’’ [::] is IPv6 version of ...
0
votes
0answers
75 views

When does an IP address not need to be assigned to a network interface?

ping 127.0.0.2 can receives response. $ ping 127.0.0.2 PING 127.0.0.2 (127.0.0.2) 56(84) bytes of data. 64 bytes from 127.0.0.2: icmp_seq=1 ttl=64 time=0.068 ms 64 bytes from 127.0.0.2: icmp_seq=2 ...
1
vote
2answers
95 views

Why is some virtual network interface assigned private IP address, while some is assigned loopback IP address?

Are docker0, lo and virbr0 are virtual network interfaces? Why are docker0 and virbr0 assigned private not loopback IP address? If private IP address can work like a loopback address, can lo be ...
-3
votes
1answer
82 views

What do `0.0.0.0:*`, `[::]:mysql`, and `[::]:*` mean in netstat output?

$ sudo netstat -ap | grep postg tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN 1567/postgres udp 0 0 localhost:57504 localhost:57504 ...
0
votes
2answers
235 views

How to access a device connected in local network with hostname?

I tried accessing a webpage in a server within the local network with the host name of the device followed by its folder path and the name of the file(it is a basic php file). In first system it ...
0
votes
1answer
54 views

How do I use grep to output only the names of files that contain any ipv4 address

I am using Red Hat Enterprise 6 and I'm trying to search through the /etc/ directory for files that contain any IPv4 address.
0
votes
2answers
45 views

Enter IP at the end of a specific line [closed]

I have the following file.txt that follows the same pattern and I want to modify it where this file is by adding an ip: # gfhfhgfh gfhfghgfhgfhgfh MACs # access USER CONSOLA *,!10.249.247.3,!10.249....
3
votes
1answer
810 views

How to automatically permanently ban IP addresses?

Currently I have been using iptables on a new Debian server running Asterisk. Every day I have been checking auth.log for IP addresses and manually doing iptables -A INPUT -s IPA.DRE.SS.0/24 -j DROP ...
1
vote
1answer
1k views

How to detect dot (.), underscore(_) and dash(-) in regex [closed]

I need to process information dealing with IP address or folders containing information about an IP host. I need a pattern that can identify (match) IP addresses, whether an actual url, name of ...
0
votes
4answers
128 views

How can a computer assign an IP address to itself? Aren't IP addresses assigned to computers by routers?

I can do this: /sbin/ip addr add 172.17.0.12 dev eth0 This possibility conflicts with my (apparently overly simplistic and untrue) mental model of how assigning IP addresses work. According this ...
0
votes
1answer
72 views

How to use sed to obfuscate an IPv6 address

I have the following sed command sed -i 'test.log' -e 's/\([0-9a-fA-F]\{1,4\}\:\)\{7,7\}[0-9a-fA-F]\{1,6\}/\1\w/g' The goal is to erase the last two blocks of the IPv6 address. However, this sed ...
0
votes
2answers
42 views

Looking up IPs and writing to file in Bash

I'm trying to reverse lookup a list of hostnames to find their IPs and write to a file. I'm referring to this tutorial and expand on it to work with a list of hostnames. I'm new to Bash scripting and ...
0
votes
2answers
296 views

dhclient command does not allocate ip address to my interface

So I was trying to access a website through my browser but I couldn't. So I issued the ifconfig command to see if there was something wrong with the IP address I noticed that the interface enp0s3 ...
0
votes
3answers
82 views

compare two IP address using bc

I am trying to compare two IP address using bc command however the IP with lower numeric value is not being trapped in the test. Here is my code: TEST=$(echo "$i < $IP_BRD && $i > $...
0
votes
0answers
20 views

Gaining information about a device using SD reader

I have a few SD cards which I forgot the static IP I assigned as well as the distribution. I can access the card using a SD reader. How can I gain this information? bacnet@gb-f75466e7-b8e8-4706-...
1
vote
0answers
148 views

Any way to advertise preferred IPv6 address with rtadvd

I have both native and HE-tunnel IPv6 addresses on my router (FreeBSD 10.3-RELEASE-p20). Hurricane electric prefix is static, native prefix is not guaranteed to be static, it is obtained by prefix ...
1
vote
2answers
21 views

Substitute numbers in a random IP address port with space

I have a file with IP and port numbers. I would like to take out the port number and leave the IP alone. xyz 10.93.10.13:58160). xyz 10.93.10.13:58161). xyz 10.18.104.181:12466). xyz 10.93.10.13:...
1
vote
1answer
329 views

check if input matches with ip format? [duplicate]

That's how I try to do it. read -p "enter ip " ip if [[ $ip =~ ^[1-255].[1-255].[1-255].[1-255]$ ]]; then echo "good"; fi Only work if the input is 1.1.1.1
2
votes
1answer
117 views

what does the following egrep command do in combination with the “ip a” command?

ip a | egrep '([0-9]{1,3}\.){3}[0-9]{1,3}' Can somebody explain what the above command will do?
1
vote
1answer
37 views

interface stops retrieving pages when static ip is set

Below is my current setup, the main ethernet connection is configured with a static ip and it's working fine. The two other interfaces are connected to different Android hotspots using DHCP. I have ...
1
vote
0answers
1k views

Preconfigure static IP address with connmanctl on Beaglebone Black

Short Version How can I used connmanctl to set a static IP address for an Ethernet interface on a Beaglebone Black running Debian 9 - prior to connecting the device to an Ethernet cable? Longer ...
1
vote
2answers
337 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 ...
0
votes
1answer
82 views

Inconsistent interface name between “ip addr” and file “ifcfg-xxx” and its “NAME” field on CentOS 7

I'm running CentOS 7 over VirtualBox VM. I installed the OS with one virtual network adapter and then added another one later, using VirtualBox. The first adapter is normal. It has a normal name '...
0
votes
1answer
76 views

How to find a private class A IP address assigned to cable modem by DHCP server?

How to find a private (Class A) cable RF IP address (10.x.x.x) assigned to cable modem by provisioning system in DOCSIS cable network node? In certain situations, when device is online, the IP address ...
-4
votes
2answers
5k views

ping google.com by using IP address [closed]

host google.com ping google.com nslookup google.com After these commands, I don't know how to ping the server by using IP address.
-2
votes
1answer
62 views

How to install MySQL on Ubuntu with a particular IP address on a particular port?

How do I install MySQL on ubuntu 14.04 with the bind address as a particular IP address on port 1723?
4
votes
2answers
909 views

Check overlapped subnets

I want to know if there's a way to check if some subnets are (or not) overlapped with a List of IPs For example, we have this List: 197.26.9.128/25 193.36.81.128/25 194.33.24.0/22 188.115.195.80/28 ...
0
votes
2answers
260 views

How to configure bro to listen locally instead of on all interfaces?

By default, bro listens on port 47660, that is okay, but I cannot seem to find any option to tell it to only listen on a particular IP or interface. Is that possible? I checked here: https://github....
1
vote
1answer
136 views

ip address “@” (at) in output

I'm having hard time reading the output of ip a command. Normally it prints something like this: 3: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP ...
0
votes
2answers
120 views

How to make linux sed command find match ip address

In my Linux system, executing listdata.sh outputs: { "111.111.111.111:11957": 1, "222.222.222.222:9999": 1, "333.333.333.333:9999": 1, "[::]:0": 1, "444.444.444.444:9999": 1, "...
0
votes
3answers
295 views

How to filter ranges of IP addresses?

How could I filter a single IP address or a range of IP addresses to prevent them from accessing my computer? Examples: Block 31.13.76.102 Block from 216.58.192.0 to 216.58.223.255 Block from 173....
4
votes
2answers
8k views

How can I resolve hostname to ip using different DNS servers?

For my task, I need to block some hostnames, but since some websites may reply with different IP addresses to different DNS queries (for example, Google DNS and any other DNS server), I'd like to ...
0
votes
1answer
2k views

Script to print the interfaces and IP addresses [duplicate]

I would like to run a script to get all network interfaces and their IP addresses of a standalone PC, such that the command line can print out, for example: <interface1> <IP address> ...
0
votes
1answer
157 views

Single line command for logging IP

Is there a way to write something (in this case an external IP) with date & time and append it to a file? Is it possible to do it in one line? I can do this: curl ipinfo.io/ip >> ip.log ...
5
votes
3answers
7k views

How do I get my IP address from the command line? [duplicate]

I'm using Debian 8. How do I get my external IP address from a command line? I thought the below command would do the job ... myuser@myserver:~ $ /sbin/ifconfig $1 | grep "inet\|inet6" | awk -F' ' '...
0
votes
3answers
142 views

bash scripts fail while trying to use list

I found a bash script to validate ip addresses here: http://www.linuxjournal.com/content/validating-ip-address-bash-script When i try to run it I get the error : test.sh: line 22: syntax error: ...
1
vote
2answers
4k views

How to get different IPs on cloned machines with VirtualBox?

I created a virtual machine with a CLI iso of Lubuntu 16.04 with VirtualBox. Now I need several machines with the same characteristics (but different IPs, in order to test a C network application I ...
1
vote
1answer
394 views

busybox regular expression for group of IP addresses

I need to be able to validate a group of IP addresses that will appear in a file that looks like this: IP_SUBNETS=['10.1.111.0','10.2.111.0','10.2.123.0'] I'd like to write a regular expression ...