Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 answer
30 views

curl is not able to resolve host by default, --ipv4 switch works

I have a Linux Alpine (v3.18.6) container running on AKS. The curl command inside that container is not able to resolve a private DNS host. Also, nslookup throws SERVFAIL. However, when I provide --...
Snehasish Karmakar's user avatar
1 vote
1 answer
12 views

Trying to conifugre bridge on GRE interface, facing issue

I have created an ipv6 tunnel by using the following commands: ip link add gre_test type ip6gre remote 2001:4860:4860::8888 local ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ttl 255 removed actual ipv6 ...
vrax's user avatar
  • 11
0 votes
0 answers
80 views

How to bind a forwarded local port to 0.0.0.0 instead of 127.0.0.1? "Operation not permitted" when using GatewayPorts=yes

A (remote) SSH server remote runs a service on (remote) 127.0.0.1 port 20001. I want to make this service available locally via SSH port forwarding: ssh -vvv -4 -L 20001:127.0.0.1:20001 remote Port ...
finefoot's user avatar
  • 3,090
0 votes
0 answers
23 views

Script for ubuntu with 2 IPv4 so that auto choose which direction to go through

I have a PC with two IPs, for an internal network with IP 10.X.X.X and another for an external network with IP 192.168.X.X I have two network configuration profiles, one for each. If I am on 10.x.x.x ...
B_ Gamer's user avatar
0 votes
1 answer
2k views

raise network interfaces - debian 12

I'm trying to add one main IP, two extra IP and one IP6. Here is my interfaces file located at /etc/network/interfaces: source /etc/network/interfaces.d/* auto lo iface lo inet loopback allow-hotplug ...
ramed rafie's user avatar
0 votes
0 answers
39 views

How does --network=host generate different HTTP requests then rootless networking?

I have two commands, one of them with # RESOLVES TO IPV6 podman run --network=host ... And one of them, # RESOLVES TO IPV4 podman run --network=slirp4netns ... Is there anyway to ensure both of ...
Evan Carroll's user avatar
  • 31.3k
0 votes
1 answer
257 views

Unable to ping or ssh into embedded Linux device: eno1 has no IPv4 address

I am trying to ssh into an embedded Linux device (let's call it petalinux) connected to my Ubuntu server running 22.04 (let's call it oip). petalinux and oip are connected by a direct ethernet cable ...
rkshthrmsh's user avatar
0 votes
1 answer
297 views

Unable to get IPV4 with dhcpcd on Alpine in a dual stack setup

After installing dhcpcd, the machine is unable to get IPv4 from DHCP, but generate IPv6 as expected and get DHCPv6 options (like DNS, domain, etc.); the config in /etc/networking/interfaces is auto lo ...
leoniDEV's user avatar
4 votes
2 answers
6k views

dhcpd or dhclient not found

I'm working on a custom Ubuntu 20.04 server and am trying to get a dhcp IP for it. The server has so far run on a static IP and when I run dhcp or dhclient it says dhcpd: command not found and ...
user2384330's user avatar
0 votes
1 answer
1k views

IP fragments are not reassembled due to packet loss in Linux

I have been working with a device that sends heavy TCP/IP traffic. I'm trying to capture those packets in my Linux machine (Ubuntu 22.04.2 LTS) with Python programming language. But, most of the time ...
mustaphos's user avatar
0 votes
1 answer
453 views

What's the difference between IP forwarding via /etc/sysctl.conf and /proc/sys/net/ipv4/ip_forward? [duplicate]

I've only used /proc/sys/net/ipv4/ip_forward to enable/disable IP forwarding so far. However, I recently came across a video where the author uses /etc/sysctl.conf to enable IP forwarding. Did he do ...
Shawn M.'s user avatar
0 votes
0 answers
143 views

In LINUX what commands will validate an IP/CIDR is correct for the physical network?

Internal to a Linux system (RHEL8/CentOS8), what linux commands can assist in detemining that a given IP/Netmask (CIDR) is correct for the network assigned to these hosts? For the following examples, ...
Joseph Wulf's user avatar
0 votes
0 answers
693 views

DNS wont resolve on Fedora 37

I just installed Fedora 37 on my laptop and cannot get the DNS to resolve despite attempting every remedy I’m capable of completing. I am new to Linux and do not understand the jargon, I can use the ...
Nyoke Node's user avatar
1 vote
1 answer
2k views

Highest performance way to route traffic from IPv4 to IPv6 on Linux?

I have a use case where I want to forward certain IPv4 ports incoming into a machine, to to the same ports on another machine that uses IPv6. I assume I can do this with [auto]ssh, but wonder if this ...
Thomas Browne's user avatar
1 vote
0 answers
108 views

How should I edit my /etc/network/interfaces entry for both ipv4 and ipv6?

I have an entry for my PC's Ethernet adapter in /etc/network/interfaces; say that it's: iface eth0 inet static address 192.168.0.123/24 gateway 192.168.0.1 dns-nameservers 192.168.0.1 and ...
einpoklum's user avatar
  • 9,595
1 vote
1 answer
715 views

ping google.com within the Oracle Linux 9.1 VM is not working

I have installed the Oracle VM VirtualBox in my laptop. Then I downloaded the Full ISO image for Oracle Linux 9.1 version (via https://yum.oracle.com/oracle-linux-isos.html) and used that in order to ...
Shanka Somasiri's user avatar
0 votes
0 answers
373 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-...
markfree's user avatar
  • 365
0 votes
0 answers
273 views

curl using socks5 proxy and IPv4

When using curl with socks5 proxy, seems that my IPv4 addressing is gone: $ env ALL_PROXY=socks5h://localhost:8001 curl -4 ipconfig.io 2607:xxxxxxxx:681f $ curl -4 ipconfig.io 97.xx.xx.116 What is ...
xpt's user avatar
  • 1,614
0 votes
1 answer
3k 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 ...
sted5453's user avatar
1 vote
3 answers
2k 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 ...
HippoMan's user avatar
  • 627
6 votes
2 answers
3k 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 ...
AFP_555's user avatar
  • 291
1 vote
1 answer
9k 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 ...
Martian2020's user avatar
  • 1,177
0 votes
2 answers
2k 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 ...
ToiletGuy's user avatar
  • 195
0 votes
1 answer
370 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, ...
P i's user avatar
  • 303
1 vote
1 answer
146 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, ...
jrpear's user avatar
  • 414
0 votes
3 answers
391 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 ...
JamesThomasMoon's user avatar
1 vote
0 answers
338 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 ...
Déjà vu's user avatar
  • 626
1 vote
1 answer
2k 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 ...
KonstantinKuklin's user avatar
0 votes
2 answers
1k 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/...
Martin Vegter's user avatar
0 votes
1 answer
1k 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 &...
Nhâm Trần's user avatar
2 votes
2 answers
5k 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 ...
eloyesp's user avatar
  • 281
2 votes
2 answers
683 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 ...
Sig's user avatar
  • 21
2 votes
1 answer
1k 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....
Tom Hale's user avatar
  • 30.8k
1 vote
0 answers
276 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 ...
Philippos's user avatar
  • 13.5k
1 vote
1 answer
2k 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 ...
Akame14's user avatar
  • 11
0 votes
1 answer
126 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 ...
orig's user avatar
  • 3
0 votes
1 answer
2k 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 (...
George's user avatar
  • 121
0 votes
1 answer
2k 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 ...
Aurélien Plazzotta's user avatar
0 votes
1 answer
192 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 ...
PascalS's user avatar
  • 125
5 votes
1 answer
4k 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 ...
Jamie's user avatar
  • 153
1 vote
1 answer
366 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 ...
Luke Stewart's user avatar
0 votes
2 answers
780 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 ...
Adrián Jaramillo's user avatar
3 votes
2 answers
4k 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 ...
Evan Carroll's user avatar
  • 31.3k
0 votes
1 answer
903 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. ...
Gokul's user avatar
  • 1,071
1 vote
1 answer
670 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 ...
vendetta's user avatar
1 vote
1 answer
2k 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&...
another_stack_user999's user avatar
0 votes
1 answer
289 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 ...
CraigH's user avatar
  • 3
1 vote
0 answers
62 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 ...
Wow's user avatar
  • 11
8 votes
1 answer
10k 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:...
Evan Carroll's user avatar
  • 31.3k
2 votes
1 answer
3k 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 $...
Nick Wilton's user avatar