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.

50
votes
4answers
24k views

Can TCP provide more than 65535 ports?

Is it possible to setup a Linux system so that it provides more than 65,535 ports? The intent would be to have more than 65k daemons listening on a given system. Clearly there are ports being used ...
21
votes
2answers
33k views

netstat — why are IPv4 daemons listening to ports listed only in -A inet6?

I have a computer with: Linux superhost 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux It runs Apache on port 80 on all interfaces, and it does not show up in netstat -planA inet, ...
14
votes
2answers
44k views

Two interfaces, two addresses, two gateways?

I have a system that has two network interfaces with different IP adresses, both of which are in the public address range (albeit via NAT in the case of the first one) and both of which have different ...
9
votes
9answers
4k 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}: ...
9
votes
5answers
39k views

Can I prevent a default route being added when bringing up an interface?

I have a system with two NICs on it. This machine, and a few accompanying devices will be moved and attached to different LANs or sometimes it'll be using dial-up. eth0: - 10.x.x.x address ...
9
votes
2answers
83k views

Static IPv4 & IPv6 configuration on CentOS 6.2

I try to configure static IPv4 & IPv6 configuration on CentOS 6.2. The configuration below works perfectly : # ifconfig eth0 x.x.x.x/29 # route add defalt gw x.x.x.y # ip addr add dev eth0 XXXX:...
9
votes
1answer
1k views

curl request to IPv6 localhost gets stuck

A docker container of mine exposes a HTTP interface on port 8500, which is mapped to host port 8500. It is not IPv6 enabled. This still means, I should be able to access it at localhost:8500. IPv6 ...
7
votes
1answer
1k views

Detect other machine's address in link local?

I have two machines connected in link local IPv4 over a CAT6 cable. Is there a way from host1 that I can determine host2's IPv4 address? I'm on an Debian-derivative running kernel 3.2.0-34-generic.
6
votes
3answers
24k views

SSH login via IPv6 successfull while using IPv4 to the same host yields “Permission denied”

I'm currently stumped by a strange problem… I have a dual stack host to which I want to SSH. If I connect via IPv6 everything works like expected datenwolf@foo ~/ > ssh -6 bar.example.com Password:...
4
votes
1answer
4k views

wget uses ipv6 address and takes too long to complete

On a server wget-1.16 takes 8 minutes to complete: $ wget http://http.debian.net/debian/dists/stable/Release -O - --2017-06-12 23:44:40-- http://http.debian.net/debian/dists/stable/Release [...
4
votes
4answers
25k views

Installing vsftpd - 500 OOPS: could not bind listening IPv4 socket?

I have to set up a FTP server on my machine. I have installed vsftpd using the command: sudo apt-get install vsftpd I then edited the configuration file vsftpd.conf in the location /etc. The file ...
4
votes
3answers
6k views

Validating IP addresses (IPv4 and IPv6)

Quite simply I'd like to verify that a string represents a valid IP address in a bash script. I think like many others I've fallen into the pitfall of trying to do this with a regular expression; ...
4
votes
1answer
2k views

Fedora 18 guest in VirtualBox 4.2: How to assign static IPv4 address to guest regardless of active ethernet interface on host

I have a Ubuntu 13.04 host running VirtualBox 4.2.12. This host has both a wired and a wireless network interface, but only one of which would usually be active at any given time. For example, at home ...
3
votes
1answer
874 views

What's ndisc_cache?

Suppose I want to use : $ ip ntable show dev eth0 inet arp_cache dev eth0 refcnt 4 reachable 20744 base_reachable 30000 retrans 1000 gc_stale 60000 delay_probe 5000 queue 31 ...
3
votes
1answer
5k 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....
3
votes
1answer
6k views

NAT box with multiple internal and external interfaces

Similar questions have been asked before but my setup is a little different and the solutions to those questions are not working. A have a CentOS 6 server running iptables with 5 interfaces: eth0: ...
2
votes
1answer
8k views

Add IPv6 address to existing IPv4 interface not working

Probably a simple answer but I can't seem to find it. I am running a multihomed Debian Stable(latest) and on interface eth1 I need both IPv4 and IPv6 address. My /etc/network/interfaces looks like ...
2
votes
1answer
142 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 $...
2
votes
2answers
150 views

Fedora Core 4 won't get an IPV4 address

I have a fedora core machine, and it is picking up an IPV6 address, but not an IPV4 address. I have done dhclient -r eth0 but the ipv4 address has not come. I have reset the port using ifconfig, but ...
2
votes
1answer
5k views

How can I disable IPv6 in custom built embedded setup

I have an embedded system built using buildroot. I have had a number of network issues, one of which is that my machine cannot see its gateway despite it being on the same subnet. I have tried using ...
2
votes
1answer
287 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 ...
2
votes
1answer
523 views

Why is BIND not automatically trying all nameservers, especially when an IPv6 nameserver is unreachable?

I am running a recursive local name server using BIND on Ubuntu. I have an IPv4 network at the moment. It appears as though BIND defaults to listen for queries and recursively resolve names on both ...
2
votes
1answer
931 views

Debian and Centos: why does ipv6 prevail over ipv4

Every time I am configuring a Debian or Centos machine with a static IP address, I forget about that behavior of not taking in account my IPV4 configuration. Then, I search for the 1000th time the ...
2
votes
1answer
439 views

Can not resolve names but can ping addresses when connected to IPV4 router, all works fine with IPV6 router

At my place I have a router that gives me an IPV4 address. My Gentoo PC works fine but my Gentoo laptop stopped resolving names. I visited my parents and tried connecting to their router, which gives ...
2
votes
1answer
2k views

Loosing IPv4 and DHCP constantly asking for IP

Using Ubuntu 16.04, almost every day I'm loosing IPv4 address, being dropped by Avahi Daemon. Also, I see the DHCP is not "waiting" for leasing time to finish to request an address again, it does it ...
2
votes
1answer
101 views

Raspbian uses the complete dhcp range

I temporarily had a static ip for my raspberry. Now the config looks like this. /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp But this leads to a ...
2
votes
2answers
912 views

How does Debian select or prioritize IPv4 and IPv6 connections?

I'm going to explain my question with an example. I have two servers, A and B, both runs Debian 7.8, both have dual-stack connection to the Internet (I don't know if it matters but they even have the ...
2
votes
2answers
350 views

IPv6 NDP timer problem

Need to change Fedora Linux's IPv6 stack for NDP DAD timer changes. How to locate the Fedora's IPv6 and IPv4 stack in Fedora distribution dvd/site so that, we can recompile and generate new stack ?
2
votes
0answers
115 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 ...
2
votes
0answers
3k views

Force IPv4 over IPv6 only for certain addresses

I'm currently running Debian 8 and I'm trying to force applications like Google Chrome to use IPv4 over IPv6 only for certain sites. My ISP natively offers IPv6 and it's amazing on all websites that ...
2
votes
0answers
126 views

Allow internet access to public subnet

I'm running ESXi and received a public subnet from Hertzner.de . I've setup everything by using a 'router'-vm and different client-vm's. These client VM's can access the internet through the router-vm ...
2
votes
2answers
2k views

How to configure dhcpd to register ipv4 with bind while having static ipv6 addresses?

I have IPv6 configured on my local network via radvd; it advertises a routable IPv6 block, that all the machines auto-configure.s I have IPv4 assigned to a NAT'd block via dhcpd and that updates ...
2
votes
1answer
420 views

IPv4 goes offline several times per hour on headless remote server, IPv6 unaffected

On my Ubuntu 14.04.2 server IPv4 goes offline several times per hour (one to four times I've seen, but at no particular minute per hour or so). My hoster insists that the problem is on the server-...
1
vote
1answer
306 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 :::*
1
vote
2answers
462 views

iptables limit the number of connections in the system for both ipv4 ipv6

A connection is a 5 tuple (ip src/dst, port src/dst, protocol). What about different connections between ipv4 and ipv6? If I define the iptables rule: iptables -A INPUT -p tcp -m connlimit --...
1
vote
1answer
2k views

IPv6 over TCP or TCP6

My understanding is that tcp6 is used for connections over IPv6 & tcp is used for connections over IPv4. and ::ffff:127.0.0.1 is representing IPv6 address which is mapped to IPv4 address. ...
1
vote
1answer
69 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:...
1
vote
3answers
69 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}...
1
vote
1answer
2k 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 ...
1
vote
2answers
2k 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 ...
1
vote
1answer
802 views

Mapping IPv6 to IPv4 addresses

I'm trying to figure out what commands I can use to help me map IPv6 to IPv4 addresses on a local network. I would like to be able to do the operation both ways (IPv4 -> IPv6 and IPv6 -> IPv4) where ...
1
vote
2answers
103 views

Execute Perl commands from a specific IP?

I have a Debian Jessie 8 server with three unique IPv4 IPs. I connect to the server from Windows 7 via Putty. I can open three Putty windows using each of the three IPs. I am trying to execute a Perl ...
1
vote
1answer
5k views

Change the listening address to IPv4 from IPv6

I use netstat -plnt check the vsftpd deamon, it is listening the IPv6(tcp6) address, so I use the FileZilla can not connect the VM. [root@localhost src]# netstat -plnt Active Internet connections (...
1
vote
1answer
3k views

IPv4 broadcast routing in Linux

I have a server with three network interfaces- loopback interface lo and two physical network interfaces eth0 and eth1: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN ...
1
vote
1answer
51 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 ...
1
vote
1answer
569 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! ...
1
vote
1answer
1k views

Not getting dynamic IP address by dhclient on a virtual Fedora

I run a course that includes practical classes on system administration. For that years ago I created a Fedora 20 virtual image -- it need not be a modern and secure one as it is only for executing ...
1
vote
2answers
11k views

Apache server not listening on IPv4 but listening on IPv6

We are facing one weird problem on one of our RHEL apache server. Actually, it is not listening on port 80 from remote hosts. When we locally browse http://localhost it is opening default page. When ...
1
vote
1answer
520 views

Routing packets between IPv4 and IPv6 networks on different Interfaces

I have a Linux-Board with two Ethernet-Interfaces (eth0, eth1). On eth0 I have a IPv4 network, on eth1 there's a IPv6 network. Now I want to route packets from specific devices on the IPv4-network to ...
1
vote
1answer
2k views

Changing the port letsencrypt tries to connect on

So, one of my servers is behind NAT, and since there is already a publicly accessible apache server going on my LAN, I decided to access it from the outside with different ports, and remap them to the ...