Questions tagged [ipv4]

Use the ipv4 tag ONLY if the nature of your question specifically involves IPv4 addresses or networking -- often in contrast to IPv6. Most networking currently involves IPv4 addresses, so you should NOT include this tag with every networking question.

Filter by
Sorted by
Tagged with
0 votes
3 answers
26 views

debian 8: My machine started to only use IPv6 for *outgoing* connections. How to go back to IPv4?

I'm running debian 8 on my server. Recently, the server starting only using IPv6 for all outgoing TCP connections. It still accepts IPv4 for incoming connections, however. Because of this, I can't ...
user avatar
  • 271
0 votes
0 answers
113 views

How to connect a QEMU VM to the internet over host's network?

I typed the following command into my terminal: qemu-system-ppc64le -boot menu=on -device e1000,netdev=network0 -drive file=myVM.qcow2,format=qcow2 -machine pseries-2.12 -m 4G -netdev user,id=network0 ...
user avatar
  • 1
1 vote
1 answer
52 views

How do packets flow through the kernel

When it comes to packet filtering/management I never actually know what is going on inside the kernel. There are so many different tools that act on the packets, either from userspace (modifying ...
user avatar
  • 181
0 votes
1 answer
867 views

"Connecting...", "Connection failed. Activation of network connection failed" How to find out what does it mean exactly? (ping works)

I've connected two PCs running Linux Mint 20.2 with NetworkManager with Ethernet cable. On enabling the interface PCs obtained ip6 addresses and I'm able to ping one from another. But I'm getting ...
user avatar
0 votes
2 answers
363 views

Convert list of IP into fixed CIDR form

Is there a tool that we can convert a list of IP into a fixed network CIDR form with x.x.x.0/24 and x.x.0.0/16? For example, to demonstrate this, I have list of IPs that possibly can be converted to ...
user avatar
0 votes
1 answer
52 views

Specify which of my machine's IP4 or IP6 addresses is to be used for a curl request

My linux box has 3 IP4 addresses and a range of IP6 addresses. Supposing I wish to make a curl fetch, how to stipulate from which address the request emanates? Note: I'm actually using Python/PyCurl, ...
user avatar
  • 283
1 vote
1 answer
43 views

Is Fedora 34 configured for IPv4 link-local addresses?

This page, linked from the avahi-autoipd man page says: Most modern Linux distributions already include full IPv4 link-local support However, if I look at the routing table on my Fedora 34 machine, ...
user avatar
  • 147
0 votes
3 answers
73 views

common intranet service to reflect IP address

how can I get my apparent intranet IP Address (i.e. my VPN address) using a common service or hack within the intranet? A useful Internet service is http://ifconfig.me which reflects the apparent ...
user avatar
1 vote
0 answers
68 views

Netplan: give IPv6 priority over IPv4

On a dual-stack workstation (single interface, Ubuntu 18.04), I'd like IPv6 to be chosen first, before IPv4. I guess that means essentially to have domains being resolved first by DNS6, and then by ...
user avatar
  • 602
0 votes
1 answer
486 views

Router with nftables doesn't work well

I have Debian 4.19.194-1 as a router server with LAN, WAN, PPPOE (as gateway) and COMPUTER1 in LAN network which should have access to internet through Debian router. As firewall I use nftables with ...
user avatar
1 vote
2 answers
471 views

wpa_supplicant: disable IPv6

I don't have support for IPv6 on my system, and I am only using IPv4. My wpa_supplicant logs are flooded with following error messages: wpa_supplicant[3370]: nl80211: Failed to open /proc/sys/net/...
user avatar
0 votes
1 answer
186 views

getaddrinfo() return both ipv4 and ipv6 while local system has ipv4 only

I use getaddrinfo(3) to get list ip address from a domain which support both ipv4 and ipv6, but the local system support ipv4 only or both ipv4 & ipv6, As I expect, if system support both ipv4 &...
user avatar
0 votes
0 answers
193 views

UFW and its dependency for iptables, ipv4 and ipv6

Hi all Linux Noob here, I am trying to include UFW (uncomplicated firewall) in my custom Linux kernel 4.1.15 for imx6 series board, but I am getting some errors when configuring and enabling the UFW . ...
user avatar
2 votes
2 answers
826 views

How to resolve IPv4 first on Alpine Linux?

It seems that when resolving hosts on Alpine Linux, the default behavior is to try IPv6 first and falling back to IPv4. But sometimes it takes a lot of time to resolve, and there are connections when ...
user avatar
  • 231
1 vote
2 answers
122 views

mapping ipv4 to routable ipv6 addresses (OpenVPN, NAT, iptables, nftables)

I have to connect multiple, potentially hundrets of networks (branch offices) with overlapping network ranges to a single "core" network using OpenVPN. I wonder if there is a tool that helps ...
user avatar
  • 11
1 vote
1 answer
364 views

`dig -4` returns IPv6 address

Why would dig -4 return an IPv6 address? % dig -v DiG 9.16.5 % % dig -4 @8.8.8.8 TXT o-o.myaddr.l.google.com | grep TXT ; <<>> DiG 9.16.5 <<>> -4 @8.8.8.8 TXT o-o.myaddr.l....
user avatar
  • 24.6k
1 vote
0 answers
102 views

How to avoid IP collisions of RNDIS devices?

Scenario is like this: I have a couple of devices using autoip and mdns over rndis (ethernet over USB) to connect to a host: You connect them with usb, the PC detects an rndis device, both ends choose ...
user avatar
  • 11.2k
1 vote
1 answer
793 views

ETH0 no address ip with ifconfig

I've created a new LXC on debian jessie, but it doesn't have an ipv4 address. When I connect to my LXC and do ifconfig: eth0 Link encap:Ethernet HWaddr blabla inet6 addr: blabla/64 ...
user avatar
  • 11
0 votes
1 answer
108 views

IPv4 iptables blocks things, but output policy is ACCEPT, what is the problem with my INPUT DROP chain?

This is my IPv4 iptables list at this moment: Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere ctstate ...
user avatar
  • 3
0 votes
1 answer
573 views

Why does my Linux system have both private address and APIPA (link-local) assigned address on IPv4 interface

On Linux Kernel 4.19.94+, I could see IPv4 private and link-local address assigned to the interface eth0 as shown below. My understanding is that Automatic Private IP Addressing (APIPA) IP address (...
user avatar
  • 121
0 votes
1 answer
773 views

How to add an IPv6 address?

The official Debian networking documentation tells to use: ifup 6to4 But ifup is not found (ifupdown and ifupdown2 are commands not found too, even after having been installed). Does it have ...
user avatar
0 votes
1 answer
61 views

Network issues after setup a read only file system

I'm new to Linux (Raspbian Buster / Raspberry Pi 4 model B) and I have some network issues after setup a read only file system. I followed this guide to realize the ro fs. My raspberry is connected ...
user avatar
  • 115
3 votes
1 answer
2k views

Why does lsof indicate my IPv4 socket is IPv6?

I am looking at the output of lsof -i and I am getting confused! For example, the following connection between my java process and the database shows as IPv6: [me ~] % lsof -P -n -i :2315 -a -p xxxx ...
user avatar
  • 133
1 vote
1 answer
240 views

ssh - packet_write_wait when connecting ipv4 connecting via ipv6 works - What are the next steps to debug?

What could cause ssh connections over ipv4 to drop after around a minute idle. When connecting to the same server using ipv6 the connection stays alive. If running top, or otherwise interacting with ...
user avatar
0 votes
2 answers
158 views

Different IP:hostName mappings for same host in `/etc/hosts`. Why does this work?

My scenario Relevant entries in my /etc/hosts (I have them written in the same order you see them here) 172.22.5.107 www.wordpress-rend-adri.com 192.168.1.116 www.wordpress-rend-adri.com I use ...
user avatar
1 vote
2 answers
2k views

Ansible fact is undefined: `ansible_all_ipv4_addresses` is undefined

The task includes an option with an undefined variable. The error was: ansible_all_ipv4_addresses is undefined. Why would I be getting this error, if I am connecting over ipv4? I'm trying to dump ...
user avatar
  • 22.4k
0 votes
1 answer
474 views

Ip address is of 32 bit, which means 4 bytes. Yet all answers to question on 13 root dns servers say otherwise [closed]

All of the articles I read that explains why there are 13 root dns servers saying each ip address takes 32 bytes and hence (13 x 32) = 416 bytes leaving up to 96 bytes for other protocol information. ...
user avatar
  • 1,041
1 vote
1 answer
272 views

hostapd clients don't get ipv4 addresses

I'm trying to setup a raspberrypi 4 as a wifi access point. Following the official documentation I managed to bridge my eth0 interface and setup hostapd. The bridges IP is provided by an exisiting ...
user avatar
1 vote
1 answer
739 views

nftables rules not blocking traffic

I am testing NFtables and am attempting to set up a basic routing firewall on a linux machine with 2 interfaces, ens37 and ens38. Here is the ifconfig output for these 2 interfaces. ens37: flags=4163&...
user avatar
0 votes
1 answer
173 views

What happened to the "-4" option for command line FTP?

It used to be that you could force command line FTP to use IPv4 like so: ftp -4 ftp.example.com However, at some point in the relatively recent past the "-4" (and for that matter, the "-6") option ...
user avatar
  • 3
1 vote
0 answers
41 views

Cannot open/access ports on Ubuntu

I created an Apache web server on Ubuntu 18.04.2 LTS, using the guide described here. Afterwards the web server worked completely fine. Later on I installed Libvirt onto the web server, after which ...
user avatar
  • 11
5 votes
1 answer
5k views

How can I get the ipv4 address from `ip link` like I used to see with ifconfig?

When I run ip to get the ip address, I'm getting $ ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:...
user avatar
  • 22.4k
2 votes
1 answer
2k views

How to connect to a IPv6 service using IPv4 connection on CentOS 7?

I'm trying to work out how to connect an inbound IPv4 connection to a port listening on a IPv6 port on a CentOS box. To demonstrate on a vanilla CentOS 7 server: Confirm bindV6only is disabled $...
user avatar
5 votes
2 answers
3k views

ntp using ipv6 address instead of ipv4

I have a laptop running a version of Linux ( 3.12 ). I have ntpd installed and configured to sync with time.google.com. The problem I am having is if I am plugged into a network that only provides ...
user avatar
0 votes
1 answer
86 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.
user avatar
  • 3
1 vote
2 answers
772 views

Do the default settings of NetworkManager detect if there is a conflicting IPv4 address on the network?

Added support for detecting duplicate IPv4 addresses, with a timeout configurable through the ipv4.dad-timeout connection property. -- NEWS dad-timeout / int32 / -1 Timeout in ...
user avatar
  • 44.3k
3 votes
1 answer
4k views

does :::80 in netstat output means only ipv6 or ipv6+ipv4?

If I am listening on :::80, is it listening on all ipv6 or all ipv6+ipv4? This is my netstat -tln: tcp 0 0 :::8080 :::*
user avatar
  • 922
-2 votes
1 answer
85 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 ...
user avatar
1 vote
3 answers
163 views

How can check ipv4 address in shell. Like is it *.*.1.* or *.*.0.*?

So here I tried to get from the ifconfig file, but same with errors with simple ifconfig command !#/bin/sh if [/home/pi/ifconfig | grep -Eo ‘inet (addr:)?([0-9]*\.){3}[0-9]*’ | grep -Eo ‘([0-9]*\.){3}...
user avatar
1 vote
1 answer
233 views

Setting 'DF'-bit in IP-header inside pcap file

There is some .pcap-file with fragmented IP traffic. I replay this file with tcpreplay, but also I need to replay it with DF (don't fragment) bit set in some packets. I supposed that tcprewrite will ...
user avatar
  • 605
2 votes
1 answer
1k views

IPv4 and IPv6 sockets with same port

Is it possible to have a single process that would have two sockets, one using the AF_INET and one using the AF_INET6 families, while both being bound to the same port number, e.g. 20000? If the IPv6 ...
user avatar
0 votes
2 answers
401 views

iptables blocks SSH connection

I've recently upgraded my Raspberry Pi from Raspbian 8 (Jessie) to 9 (Stretch). The Pi in accessible on my LAN both via IPv4 and IPv6. I have applied some iptables rules (IPv4 only) to block hosts ...
user avatar
  • 41
0 votes
1 answer
166 views

IPv6 superuser ports

Does IPv6 have the 0-1024 superuser requirements for ports? I saw in the changelog for Linux 4.11 that they added a sysctl option to change it, but it only lists it under IPv4. Also does Open/FreeBSD ...
user avatar
  • 233
0 votes
0 answers
180 views

iptables ipv4 configuration for OpenVPN Connectvity

I'm following this tutorial in order to setup my openvpn server: https://linode.com/docs/networking/vpn/set-up-a-hardened-openvpn-server/ When i reached the part to replace the ipv4 configuration, ...
user avatar
10 votes
10 answers
12k views

Bash: Extract one of the four sections of an IPv4 address

We can use the syntax ${var##pattern} and ${var%%pattern} to extract the last and first section of an IPv4 address: IP=109.96.77.15 echo IP: $IP echo 'Extract the first section using ${var%%pattern}: ...
user avatar
  • 485
3 votes
1 answer
5k views

IPv6 socket creation failed: Address family not supported by protocol

OS: GNU/Linux Debian 9.2 64-bit I disabled IPv6 on one of my servers. And now I'm getting this in mail: exim paniclog ... IPv6 socket creation failed: Address family not supported by protocol How ...
user avatar
1 vote
1 answer
620 views

SSH Tunnel broker over IPV4 for machines behind CNAT

I am not sure if I should be asking this in Unix & Linux or Network Engineering Here is the physical scenario [Host 1]----[Carrier-grade NAT]---->AWS<----[Carrier-grade NAT]----[Host 2] ...
user avatar
1 vote
2 answers
6k views

Using Linux as router with nftables - masquerade not forwarding reply back

I have a Linux machine which I'm using as a router. It has 5 network interfaces: three separate LANs which it routes between, and two WANs. At the moment I just have one WAN as the default route, and ...
user avatar
  • 221
5 votes
1 answer
18k views

How do i check if DHCP is enabled?

I have a VM running Debian 9 and the latest version of VirtualBox. I have VirtualBox configured to use the bridged adapter and it was working fine yesterday. But when I came and got on it this morning....
user avatar
1 vote
1 answer
733 views

Get DHCP running with Kernel 4.14-rc5

I tried to solve my problem that my touchpad is not running on my Lenovo 720-15IKB by installing the latest rc kernel 4.14.rc5 as described here, which really worked! The touchpad is working then! ...
user avatar
  • 24.7k