Questions tagged [ip]

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

0
votes
0answers
20 views

Why is my static IP configuration not working in CentOS 7?

I installed a fresh version of Minimal CentOS 7. I can ping google.com when it is set to dhcp. When I run nmcli -p dev I receive: enp2s0f0 ethernet connected enp2s0f0 lo loopback unmanaged -- ...
0
votes
0answers
17 views

How to add rule exceptions for openVPN for a single IP?

I'm having a similar problem to this : Route everything through VPN except SSH on Port 22 But following those tips ended up locking me out of my server for good. I have a private OpenVPN server, to ...
0
votes
1answer
37 views

Is there a file for ip neigh show

I am looking for the file containing the output of ip neigh show command. I need the file as I can't invoke command and redirect as per requirement. The closest thing I found is the file /proc/net/arp....
3
votes
1answer
82 views

How to configure my laptop wireless adapter for DHCPv6

The network topology is as simple as it gets: After some correspondence my ISP flipped some switch to enable the router to get what the router calls a "Default IPv6 Gateway." My Ethernet-connected ...
1
vote
1answer
27 views

Change private IP address without losing internet access

I start with the following: ens33 Link encap:Ethernet HWaddr 00:0c:29:03:a8:56 inet addr:192.168.0.161 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::dfa6:820:...
1
vote
3answers
33 views

Define network interface as the default gw independently of IP

I know how to assign a default gw to an interface with an IP ip route add default via <host> dev <dev> # e.g. ip route add default via 192.168.0.101 dev eth0 The problem is that the IP ...
0
votes
1answer
83 views

How can I prevent against the HiddenWasp trojan? [closed]

As people probably know by now, some hackers released a trojan "HiddenWasp" into the Linux world. Article from Intezer: https://www.intezer.com/blog-hiddenwasp-malware-targeting-linux-systems/ So ...
0
votes
0answers
19 views

Pi zero (USB Connected) ssh to it's dynamic IP don't work

I connected my Pi Zero to my PC ( Linux LMDE 3 Cindy) via USB port successfully, SO i want to connect to internet via my laptop which is connected to internet by its WIFI. I found this instruction ...
6
votes
2answers
2k views

How to get the IP of a user who executed a command?

I figured out the timestamp of a specific rm -r command run on an Ubuntu machine from history. Now, I want to get the IP of the user who executed this command. Is there any way I can do this?
0
votes
0answers
7 views

Setting static ip for wifi adapter

I'm trying, and failing, to set a static IP for my centos 7 system which uses a wifi adapter to connect to the internet. I edited the connection and input my preferred settings using "nmtui" but that ...
0
votes
0answers
15 views

Check if link is metered using `ip`

Is it possible to find out whether an interface is sending/receiving packets using a metered link only using /usr/bin/ip? I have seen two solutions using NetworkManager with nmcli or dbus but I am not ...
6
votes
2answers
176 views

Restoring lost network routes after loss of network

I have a server in a locked-down environment with no egress to the internet, and 2 interfaces: a physical eth0, and a vlan iface eth0.101 /etc/network/interfaces contains a post-up command to enable ...
7
votes
4answers
212 views

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
55 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
50 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
46 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
43 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
30 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
68 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
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
82 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
148 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 ...
0
votes
2answers
110 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
183 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
45 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
17 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
36 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
226 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
56 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
68 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
68 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
20 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
72 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
258 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
27 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
664 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
334 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
74 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
332 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
87 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
34 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
70 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
58 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
316 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
146 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
320 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
129 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
979 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
26 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 ...