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]

Questions about the IP protocol and IP addresses. For Linux ip utility related questions, use iproute tag instead.

5
votes
4answers
115 views
+100

Get source IP from reverse SSH tunnel

If I use a client to create a reverse tunnel with SSH using -R I will get this output on the server if I run netstat: default@debian:~$ sudo netstat -pln Active Internet connections (only servers) ...
0
votes
1answer
46 views

Understanding grep -oP … In a script

I'm writting a litlle bash script for debian. I want to find the 3th octet of my IPv4 and push it into "ip1" variable, and push the final octet in "ip2" variable. After some researches I found a ...
0
votes
0answers
47 views

How to determine gateway address in a shared connection?

Suppose you have two computers, A and B, both running Ubuntu 16.04. Then you connect them with an ethernet cable and share the connection from A to B, using network manager with the option "Shared ...
1
vote
1answer
42 views

How do I find out which process opens a specific port on a specific IP address once in a while?

Once every 5 minutes or so a process on my machine, with my main user id, tries to open a connection to an unknown IP address (no rDNS) at an unusual TCP port (>1k). I can see this in the computer's ...
1
vote
1answer
39 views

Unexpected error in Script [closed]

I am currently making a script the distributes a specific script to multiple IPs through SSH, and I am having an issue within the script that I can not find. source ~/scripts/IPs script=/scripts/...
1
vote
0answers
21 views

sm-notify: bindresvport on RPC socket failed: Cannot assign requested address

Can't figure out how to make sm-notify work. I've added hostname entry with related IPv4 to /etc/hosts $ cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ...
2
votes
2answers
49 views

Configure 2 nics with static IP, 1 to the internet and one private

I'm configuring CentOS 7 networking in a server with 2 nic. Network iterfaces are: em1 which should be connected to a local network by DHCP, IP: 192.168.0.240 Gateway: 192.168.0.2 Masq.: 255.255.255....
-2
votes
0answers
46 views

Can't get IP from router with Static IP

I am trying to setup my computer to use a Static IP. Here is what my /etc/network/interfaces file looks like: auto lo iface lo inet loopback iface eth0 inet static address 192.168.1.128 ...
2
votes
0answers
30 views

Can I alter the result of DNS resolution for a VPS?

I have a VPS hosted by a no frills provider and have an IP that I log into through SHH. When I run a traceroute on it, the final hop identifies the location service as ip-somebrand.com. As my ipv4 ...
3
votes
1answer
50 views

How shall I understand the routing table “local”?

$ ip route show table local broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1 local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1 local 127.0.0.1 dev lo proto kernel scope ...
4
votes
1answer
112 views

How come one can successfully ping 127.0.0.2 on Linux?

On a FreeBSD system with a loopback network interface … % ifconfig lo0 lo0 link up loopback drv_running running multicast nd6 performnud auto_linklocal no_radr link rxcsum ...
-7
votes
0answers
45 views

In what cases, can ping receive response when the IP address is not assigned to a network interface?

Is ping supposed to test if an IP address has been assigned to a network interface and if the network interface is reacheable? Stephen replies at Why is some virtual network interface assigned ...
0
votes
2answers
101 views

Are the IPv4 and IPv6 networks for my loopback interface the same network?

In output of ifconfig: lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen ...
2
votes
3answers
78 views

How to SSH into Raspberry Pi connected via Ethernet on CentOS7?

I am trying to SSH into my Raspberry Pi 3 Model B V1.2 from my laptop running CentOS7. I have connected them together via Ethernet cable but the laptop is unable to identify Raspi. So i tried running ...
0
votes
0answers
27 views

How do I make public on the physical network a local virtual bridge

I'm using Ubuntu (Bionic, 18.04) both on remote servers and on my laptop. In wide scope, I am trying to provide direct network access to VM, currently it works via NAT (with port forwarding). libvirt ...
-1
votes
1answer
16 views

On Centos 6.10 why do my custom static ip's disapear?

The configuration of the ip is as shown. I hvae created eth0-3 but onboot the Oracle Virtual Machine creates new ip's and calls them eth4-7. Im not sure why.
0
votes
1answer
34 views

Getting the IP address of a given interface [duplicate]

I need the IP (v4) address of a device I specify. The response will be later used in a script. This is what I have: $ IFACE=eth1 $ ifconfig $IFACE |grep "inet " | awk '{print $2}' 10.0.0.33 Is there ...
0
votes
1answer
106 views

Regex expression for IP address/CIDR in bash

I want to check if the user input is a valid IP address/CIDR in bash and I am using regular expressions to do that. So valid CIDR should be 0-32 and for IP from (1-254).(1-255).(1-255).(1-255)/(1-32) ...
0
votes
0answers
16 views

send hex as characters to output to remote end

I'm doing a project for a microcontroller that involves sending and receiving special (non-printable character) data through its serial port. I found myself a simulator (ucsim) so I can test things ...
-1
votes
2answers
55 views

Easily find IPv4 address

For a long time I've used ipconfig in Windows, and ifconfig in Unix to find out my local IPv4, for different purposes. There are times when your screen is small, or you have an extensive amount of ...
27
votes
2answers
2k views

ip vs ifconfig commands pros and cons

At some point, in some teaching material (from Linux Foundation) on Linux that I came across, the following is mentioned: ip command is more versatile and more efficient than ifconfig because it ...
0
votes
1answer
56 views

Static file to map IP to MAC addresses

I created a mesh network. Sometimes the ARP, IPv4 based applications, or even ping do not correctly respond, any suggestion? Actually, I require to create a file (i.e whatever) that contains IP -> ...
0
votes
0answers
19 views

Get my IP address without 'ifconfig' or 'ip addr'? [duplicate]

I've got a stripped-down Linux container. I want to find out its IP address. I don't have ifconfig or ip installed (and I don't want to install them, since they'd just get deleted when I next rebuild ...
0
votes
1answer
50 views

Disabled nginx service, But the IP is still accessible

I have disabled nginx.service and have restarted my Ubuntu 18.04. $ systemctl list-unit-files | grep ngin nginx.service disabled $ systemctl is-active nginx.service inactive But ...
0
votes
1answer
109 views

Systemd - Set MAC address and IP address

I am trying to use systemd to set the MAC address and IP address of eth1 on my board. MAC address To set the MAC address, have created the following service: /lib/systemd/system/eth1mac.service [...
0
votes
1answer
26 views

If else IP match case with servername

I have multiple servers and want to set up a periodic check so that trapserver(s) has correct trapaddress(es). trapserver 1 as 10.10.10.1 and trapserver2 as 10.10.10.2. However the below script does ...
0
votes
1answer
262 views

Forward all traffic to a socks5 proxy port

I followed this answer: Redirect all non-local traffic to a socks proxy root@xxx:~# cat /proc/sys/net/ipv4/ip_forward 1 root@xxx:~# netstat -tapln | grep :4545 | grep LISTEN tcp 0 0 127....
0
votes
1answer
83 views

meaning of “brd” in output of IP commands

In the following example: $ ip a | grep scope.global inet 147.202.85.48/24 brd 147.202.85.255 scope global dynamic enp0s3 What does the 'brd' mean?
1
vote
0answers
46 views

will RHEL process my ifcfg-ens192.bak.xxx file?

Recently, we made a clone of a RHEL VM for testing purposes. One of the steps to make the clone unique was to give it a different IP address than the original machine (Of course). But the method used ...
0
votes
1answer
126 views

Route traffic to specific network through specific interface

I have a Ubuntu server hosted on Digital Ocean and used as a VPN and through it I would like to access my other servers there over the local network (Private Network). But I am unable to access other ...
3
votes
1answer
62 views

ip-rule doesn't work with ToS greater than 0x10

There is some weird behavior of ip-rule with specific IP ToS-values. It works fine just with values up to 0x10, but doesn't accept DSCP-part. I tried: ip ru a tos 0x20 table 1234 And got: ...
0
votes
1answer
32 views

The result returned from ip conflict with the one retrieved from google

I am running on MacOS Majave When issue command ip, it returns $ ip 211.137.170.246 However, google returns an answer: Which one should I trust?
-1
votes
1answer
68 views

Can browse to an app at localhost.company.com but that isn't in /etc/hosts; where else could the redirection be?

✗ cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 ...
0
votes
1answer
54 views

Scan network with Linux kernel command

Does Linux kernel provide some utility familiar to nmap for simple network scanning to discover attached nodes?
0
votes
0answers
194 views

How to set a static ip on Ubuntu 18.04 LTS

The goal is to set a static ip for a wifi device on a machine called myhost, which is running Ubuntu 18.04 LTS. The device name is wlp1s0, and the desired ip address is 192.168.1.10. All attempts have ...
1
vote
0answers
75 views

How to delete network namespace, no pids option available for ip netns [duplicate]

How to clean up network namespace, CentOS 6.5 does not have ip netns pids option, so can't use ip netns pids ns-2001 | xargs kill ip netns list | grep ns-2001 ns-2001 ip netns pids ns-2001 | xargs ...
1
vote
1answer
192 views

systemd-networkd DHCPServer configuring static lease

Does systemd-networkd DHCPServer support configure static lease based on for example mac addresses? If yes how? The systemd-networkd documentation doesn't mention anything about it.
0
votes
4answers
117 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 ...
1
vote
2answers
407 views

Script for checking if device is online, if not then do something

I'm building an IP Camera Server for rtsp ffmpeg capture and 24/7 purposes. Only thing that is missing is a script that checks connectivity of the camera and if it's not reachable there should be ...
-2
votes
1answer
24 views

Get Wireless LAN IPv4 Address Of Device

I want to know the easiest way and I would perfer a single line command that works on most or all Linux distros. I want to get the devices IPv4 address. The reason why I want to know this is because ...
0
votes
1answer
36 views

Get every IP except for the loopback device

I need to get every IP of an host PC over the shell, except for the loopback or localhost devices. If I use ip addr show I have the loopback devices with it. Also I cannot ask for the ip addr show [...
2
votes
1answer
94 views

How to retrieve counts of IP addresses from log file?

I am checking a log file to retrieve ip adresses plus how many times a log failed. This is what my log file looks like: Feb 2 15:20:02 tank sshd[14870]: Failed password for root from 143.100.67.173 ...
0
votes
0answers
13 views

2 VMs, communicating with static ipv6

In an attempt to better understand IPv6 routing, I've set up 2 Linux virtual machines on the same computer, that are bridged to 2 different NICs. The NICs are connected via physical cable. However, ...
1
vote
2answers
152 views

Use reference to file instead of IP in /etc/hosts

From my host with hostname localhost, I would like to reach an external host with hostname exthost through the internet. The public IP address of exthost is dynamically assigned by the Internet ...
1
vote
1answer
75 views

DHCP Server IP Conflict Detection

I am setting an Wifi Access point. A common problem about this is that router or etc. could be giving similar IP address to client devices which will cause problems. My question here is that is there ...
1
vote
0answers
31 views

Configure (route) specific connections outside of a VPN

I am using NetworkManager (Gnome) to handle all my network connections. I am connecting to a VPN with OpenVPN. My firewall (nftables) drops all traffic outside of the tun0 interface. Now I want to ...
0
votes
1answer
45 views

outputting 2 positions from same file into script and then echo

I have a file which looks like this: Sender Bob IP 10.1.1.1 Sender Alex IP 10.1.1.2 Sender Jim IP 10.1.1.3 10 lines like this in same format. I need to echo Name and IP. While iterating through my ...
0
votes
4answers
87 views

Get unknown static IP address

I have Debian squeeze machine physically connected to my network. This machine has static IP address which I don't know. It is not possible to connect monitor to this device. Only one possibility to ...
1
vote
0answers
28 views

Match SNORT IP alerts to specific URLs

I have SNORT running on an Ubuntu 18.04 server. I have alerts firing off but the alert logs come through as IP addresses. I have a list of websites the system has visited throughout the day. Is ...
-2
votes
1answer
50 views

Why is it so hard to get your own local IP address [closed]

There are so many questions asking basically: how do I get my local IP address? None of answers are portable, they all seem like a hack. This seems like such a common need, but there are no good ...