IPv6 & Linux - HowTo - Part 3
Version: 3.21 from 2001-10-24
(P) & (C) 1997-2001 by Peter Bieringer <[email protected]>,
see copyright notice for
more details
Original site of publishing: http://www.bieringer.de/linux/IPv6/;
suggestions, comments and improvements are welcome!
Important Applications
If you miss hint for the old inet6-apps based stuff, please goto
Obsoletes
Contents
-
IPv6 configuration tools
-
Net-tools (hostname, netstat, arp, ifconfig, rarp,
route)
-
General applications
-
IPv6 debugging tools
Net-Tools (hostname, netstat, arp, ifconfig, rarp,
route)
IPv6-maintained by Philip Blundell <[email protected]>
Why?
In older distributions several needed net-tools only supply IPv4, but for
interface configuration you need IPv6 enabled tools.
-
First check if the current installed version with
is already with netstat -?
If you see similar output at the end:
List of possible address families (which
support routing):
inet (DARPA Internet) inet6 (IPv6)
ax25 (AMPR AX.25)
netrom (AMPR NET/ROM) ipx (Novell IPX) ddp
(Appletalk DDP)
You can skip this section!
ToDo
Distribution |
RHL 6.2 |
RHL 7.1 |
RHL 7.2 |
ToDo |
rebuild SRPMS |
rebuild SRPMS |
install from distribution |
URLs:
Version and filename of the packet:
Latest version I have compiled like shown was net-tools-1.54.tar.gz
longer time ago...
Latest version I use is 1.60 from Red
Hat rawhide (rebuilded SRPMS), because there were some byte-order problems
earlier versions (results in swapped output of parts of IPv6 addresses).
Additional informations:
Net-Tools must be built with IPv6 enabled kernel source (2.2.x., 2.4.x)
Contents:
Application |
Path |
Description |
hostname |
/bin/hostname |
|
netstat |
/bin/netstat |
Network status |
arp |
/sbin/arp |
ARP cache manipulation |
ifconfig |
/sbin/ifconfig |
Interface configuration |
rarp |
/sbin/rarp |
RARP cache manipulation |
route |
/sbin/route |
Internet route manipulation |
Unpacking, configuration and installation
-
Move into the source directory:
-
Unpack the new source:
-
tar xzf your-path/net-tools-version.tar.gz
-C /usr/src
-
Rename the new directory:
-
mv net-tools net-tools-version
-
Now create/overwrite the softlink, necessary for shorter paths:
-
ln -sf /usr/src/net-tools-version /usr/src/net-tools
-
Move into the source directory:
-
Configure the compile options: make clean; make config
Don't forget to set other options depending
on your system, too!
Net-tools option |
Suboption |
Selection |
GNU gettext |
|
yes, if glibc-2 |
Protocol Families |
UNIX protocol family |
yes |
|
INET (TCP/IP) protocol family |
yes |
|
INET6 (IPv6) protocol family |
yes |
Device hardware types |
SIT (IPv6-inIPv4) support |
yes |
-
Now compile:
-
make
You should get no errors!
-
And install:
-
make install
Binaries and manuals are directly installed to the given directories
Don't worry about such messages: "ls: *.[158]: directory not found",
they are caused by non existent multilingual manpages (the US version will
be always installed)
IP Utilities (ping6, tracepath6, traceroute6...)
(IPv6)-maintained by Alexey N.Kuznetsov
Why?
Perhaps your installed IP utilites do not support IPv6.
-
First check if the current installed version with
is already ok with rpm -q --qf "%{NAME}-%{VERSION}\n"
iputils
Result: iputils-20000121 or better
You can skip this section!
ToDo
Distribution |
RHL 6.2 |
RHL 7.1 |
RHL 7.2 |
ToDo |
install from distribution |
install from distribution |
install from distribution |
URLs:
Version and filename of the packet:
RedHat 6.2 contains iputils-20000121, which
is already IPv6 enabled, later versions should also be IPv6 enabled.
tcp_wrappers
IPv6-patch by USAGI
Why?
Access control to TCP/UDP services
ToDo
Distribution |
RHL 6.2 |
RHL 7.1 |
RHL 7.2 |
ToDo |
problems |
rebuild SRPMS |
install from distribution |
URLs:
Version and filename of the packet:
Latest version I've tested is a rebuild from tcp_wrappers-7.6-19.src.rpm
Contents:
Application |
Path |
Description |
tcpd |
/usr/sbin/tcpd |
TCP wrapper daemon |
libwrap.a |
/usr/lib/libwrap.a |
Wrapper libary |
Using SRPMS: RPM build and install (RHL 6.2)
Hopefully filled soon....there is a problem with missing "sin6_scope_id"
in glibc-2.1
Using SRPMS: RPM build and install (RHL 7.1)
-
Rebuild binary
-
rpm --rebuild /path/to/SRPMS/tcp_wrappers-version-release.src.rpm
-
Freshen/install package
-
rpm -F|ihv /path/to/RPMS/cpu/tcp_wrappers-version-release.cpu.rpm
Using source: Unpacking, configuration and installation
Perhaps filled in the future
Usage
-
First, deny all access (if handled by tcp_wrappers), edit /etc/hosts.deny
# Deny all access
ALL: ALL
-
Allow particular access, edit /etc/hosts.allow
# Allow ssh access
sshd: [3ffe:400:100:f101::]/64
-
See also given manpages for more details
Hints
-
If access won't work, even if allowed, then it is perhaps a built problem
of the dedicated server binary. Rebuild SRPMS after IPv6-enabled tcp_wrappers
was installed.
-
Happen to me with openssh, /var/log/secure shows lines like sshd[pid]:
refused connect from 0.0.0.0
eXtended InterNET super Daemon (xinetd)
(IPv6-)maintained by the developers
Why?
Normally, your installed internet super daemon isn't ready to handle IPv6
addresses, and not all of the daemons should run in stand-alone mode.
ToDo
Distribution |
RHL 6.2 |
RHL 7.1 |
RHL 7.2 |
ToDo |
rebuild SRPMS |
install from updates |
install from distribution |
Additional information
Because of security issues, please use the latest
release (2.3.3+) instead of the versions shown. See RHSA-2001:092-02.
This also supports IPv6 "out of the box" with daemon xinetd-ipv6 (See
Bugzilla Bug 49621,http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=49621
).
URLs:
Version and filename of the packet:
Latest version I've tested is a rebuild from xinetd-2.3.0-3.src.rpm from
http://www.netcore.fi/pekkas/linux/ipv6/,
it rebuilds into 2 binary RPMs, one for IPv4 and one for IPv6 (due some
not well socket binding code you cannot start the IPv4-only xinetd on an
IPv6 enabled system). If you install both, the runlevel start script will
choose the right one depending on IPv6 switches.
Latest tarball version I have tested is xinetd-2.1.8.8p2.tar.gz
I've published a modified spec file. You can use it for rebuilding
a given SRPMS: ftp://ftp.bieringer.de/pub/linux/IPv6/xinetd/
Contents:
Application |
Path |
Description |
xinetd |
/usr/sbin/xinetd |
Internet super daemon |
itox |
/usr/sbin/itox |
Conversion utility for inetd.conf |
Preparation
-
Before you install the IPv6 enabled xinetd, you should deinstall the normal
inetd and install the IPv4 only xinetd. Then, after you are familiar with
xinetd, you can go a step further on to the IPv6 enabling.
Using SRPMS: RPM build and install (RHL 6.2)
-
Create a softlink (greetings from the Linux filesystem standard...)
-
ln -s /etc/rc.d/init.d /etc/init.d
-
Install source RPM
-
rpm -ihv /path/to/SRPMS/xinetd-2.1.8.9pre14-7.src.rpm
-
Apply patch to SPEC file
-
cd /path/to/SPEC/
-
cat /path/to/spec-patch/xinetd-pekkas.spec.diff
| patch
-
Rebuild
-
rpm -ba xinetd-rhl-6v2+7.1.spec
-
Freshen/install package
-
rpm -F|ihv /path/to/RPMS/cpu/xinetd-version-release.cpu.rpm
Using SRPMS: RPM build and install (RHL 7.1)
-
Rebuild binary
-
rpm --rebuild /path/to/SRPMS/xinetd-version-release.src.rpm
-
Freshen/install package
-
rpm -F|ihv /path/to/RPMS/cpu/xinetd-version-release.cpu.rpm
Using source: Unpacking, configuration and installation
-
Move into the source directory:
-
Unpack the new source:
-
tar xzf your-path/xinet-version.tar.gz
-
Move into the source directory:
-
Run configure
-
If you want to place the binaries in /usr/*
-
./configure --with-inet6 --prefix=/usr
-
If you want to place the binaries in /usr/local/*
-
./configure --with-inet6 --prefix=/usr/local
-
If you want to place the binaries in /usr/inet6/*
-
./configure --with-inet6 --prefix=/usr/inet6
-
Compile:
-
make clean; make
You should get no errors!
-
And install:
-
make install
Binaries and manuals are copied into directories depending on 'configure'
Running
-
See given manpages for details
-
Create a configuration file from the old inet.conf:
-
cat /etc/inetd.conf | itox -daemon_dir /usr/sbin/tcpd >/etc/xinetd.conf
-
Edit /etc/xinetd.conf (i.e. copied from the example) for your
requirements
-
If used the
IPv6 test
-
Enable a built-in service (i.e. daytime) in the config file, (re)start
daemon and look for open ports:
[root@titan log]# netstat -A inet6 -anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address
Foreign Address State
PID/Program name
tcp
0 0 :::13
:::*
LISTEN 6966/xinetd
udp
0 0 :::13
:::*
6966/xinetd
raw
0 0 :::58
:::*
7 -
raw
0 0 :::58
:::*
7 -
raw
0 0 :::58
:::*
7 -
-
tcp|udp = IPv6 enabled service
-
raw = IPv6 enabled kernel
Telnet client and server
Important informations:
Do not use telnetd for remote logins because of clear text password
transport, take SSH instead!
ToDo
Distribution |
RHL 6.2 |
RHL 7.1 |
RHL 7.2 |
ToDo |
rebuild SRPMS |
rebuild SRPMS |
install from distribution |
RHSA-2001-099
URLs:
Using SRPMS: RPM build and install
-
Rebuild binary
-
rpm --rebuild /path/to/SRPMS/telnet-version-release.src.rpm
-
Freshen/install package
-
rpm -F|ihv /path/to/rpms/cpu/telnet-version-release.cpu.rpm
Finger client
ToDo
Distribution |
RHL 6.2 |
RHL 7.1 |
RHL 7.2 |
ToDo |
rebuild SRPMS |
rebuild SRPMS |
install from distribution |
URLs:
-
Source RPM for Red Hat systems
Using SRPMS: RPM build and install
-
Rebuild binary
-
rpm --rebuild /path/to/SRPMS/finger-version-release.src.rpm
-
Freshen/install package
-
rpm -F|ihv /path/to/rpms/cpu/finger-version-release.cpu.rpm
FTP server "ftpd-BSD"
(IPv6)-maintained by the developers
URLs:
Version and filename of the packet:
Latest RPM version I have tried is 0.3.3
See advisory here http://www.openbsd.org/advisories/ftpd_replydirname.txt
Contents:
Application |
Path |
Description |
ftpd-BSD |
/usr/sbin/ftpd-BSD |
FTP daemon |
Unpacking, configuration and installation
Download RPM and install it (package is already RPM enabled)
Test
-
Test, if no other FTP daemon is running
-
netstat -ln -A inet | grep 21
-
Start FTP daemon in standalone and IPv6 enabled mode
-
[root@gate ftpd-BSD]# ftpd-BSD -D -6
-
Look for listening on IPv4 only port:
[root@gate ftpd-BSD]# netstat -A inet -ln |grep 21
-
Look for listening on an IPv6 port:
[root@gate ftpd-BSD]# netstat -A inet -ln -A inet6 |grep 21
tcp 0
0 :::21
:::*
LISTEN
FTP client netkit ftp
(IPv6)-maintained by ?
ToDo
Distribution |
RHL 6.2 |
RHL 7.1 |
RHL 7.2 |
ToDo |
rebuild SRPMS |
rebuild SRPMS |
install from distribution |
URLs:
-
Source RPM for Red Hat systems
Using SRPMS: RPM build and install
-
Rebuild binary
-
rpm --rebuild /path/to/SRPMS/ftp-version-release.src.rpm
-
Freshen/install package
-
rpm -F|ihv /path/to/rpms/cpu/ftp-version-release.cpu.rpm
FTP client "lukemftp"
(IPv6)-maintained by the developers
URLs:
Version and filename of the packet:
Latest tarball version I have tested is lukemftp-1.5beta2.tar.gz
Contents:
Application |
Path |
Description |
ftp |
/usr/local/bin/ftp |
FTP client |
Unpacking, configuration and installation
-
Move into the source directory, create new subdirectory and change into
it
-
cd /usr/src; mkdir lukemftp; cd lukemftp
-
Unpack the new source:
-
tar xzf your-path/lukemftp-version.tar.gz
-
Move into the source directory and read the information files README,
INSTALL,...
-
Run configure
-
Compile:
-
make clean; make
You should get no errors!
-
And install:
-
make -n install
-
make install
Binaries and manuals are copied into directories
-
To prevent confusion with an existing IPv4-only FTP client, you can
-
deinstall this binary with
-
rename the IPv6-enabled
-
mv /usr/local/bin/ftp /usr/local/bin/ftp6
TCPdump and libpcap (tcpdump)
(IPv6)-maintained by the developers
ToDo
Distribution |
RHL 6.2 |
RHL 7.1 |
RHL 7.2 |
ToDo |
rebuild SRPMS |
rebuild SRPMS |
install from distribution |
Additional informations:
Known bug: version 3.6 shows no longer any interface
string.
Hint: to select all interfaces for packet capturing,
use option "-i any"
URLs:
Version and filename of the packet:
Latest tarball version I have tested is tcpdump-3.6.2.tar.gz,
libpcap-0.6.2.tar.gz
and rebuilded 3.6.2-2.src.rpm
Contents:
Application |
Path |
Description |
Overlap |
libpcap.a |
|
Packet capture libary |
existing installed tcpdump |
tcpdump |
|
Sniffer |
existing installed tcpdump |
Using SRPMS: RPM build and install
-
Rebuild binary
-
rpm --rebuild /path/to/SRPMS/tcpdump-version-release.src.rpm
-
Freshen/install package
-
rpm -F|ihv /path/to/RPMS/cpu/tcpdump-version-release.cpu.rpm
-
rpm -F|ihv /path/to/RPMS/cpu/libpcap-version-release.cpu.rpm
Using source: Unpacking, configuration and installation (libpcap)
-
Move into the source directory, create directory and move into it:
-
cd /usr/src; mkdir libpcap; cd libpcap
-
Unpack the new source:
-
tar xzf your-path/libpcap-version.tar.gz
-
Change to created directory and read the information files README,
INSTALL,...
-
Run configure utility:
-
./configure --enable-ipv6
-
Now compile:
-
make clean; make
You should get no errors!
-
And install the libary
-
make install
-
Libary is installed in /usr/local/lib/libpcap.a
Using source: Unpacking, configuration and installation (tcpdump)
-
Move into the source directory, create directory and move into it:
-
cd /usr/src; mkdir tcpdump; cd tcpdump
-
Unpack the new source:
-
tar xzf your-path/tcpdump-version.tar.gz
-
Change to created directory and read the information files README,
INSTALL,...
-
Run configure utility:
-
./configure --enable-ipv6
-
Now compile:
-
make clean; make
-
If you got an error "./print-icmp6.c:576: #error unknown mld6 struct",
replace around line 576
#error unknown mld6 struct
with
void
mld6_print(register const u_char *bp)
{
printf("unknown mld6");
}
-
If you got an error "./print-rt6.c:86: `IPV6_RTHDR_TYPE_0' ...",
add
#define IPV6_RTHDR_TYPE_0 0
-
If you got an error about missing libpcap libary, fix
-
Makefile
-
Append:
-
INCLS = -I. -I$(srcdir)/missing -I$(srcdir)/linux-include -Ipathto/libpcap/libpcap-version
-
i.e. -I../../libpcap/libpcap-2000.10.05
-
If you got an error about problems in following file, fix
-
print-ppp.c, print-chdlc.c
-
And install, but attention, selectively installing the binaries prevents
you overriding existing ones
-
make install
-
tcpdump is installed in /usr/local/sbin/tcpdump