From owner-freebsd-questions@FreeBSD.ORG Mon Jul 14 15:53:15 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6778137B401 for ; Mon, 14 Jul 2003 15:53:15 -0700 (PDT) Received: from mail-2.tiscali.it (mail-2.tiscali.it [195.130.225.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7418343F93 for ; Mon, 14 Jul 2003 15:53:14 -0700 (PDT) (envelope-from fcasadei@inwind.it) Received: from goku.kasby (217.133.211.13) by mail-2.tiscali.it (6.7.016) id 3F0EBA90001B245E for freebsd-questions@freebsd.org; Tue, 15 Jul 2003 00:53:12 +0200 Received: (qmail 1053 invoked by uid 1000); 14 Jul 2003 22:53:09 -0000 Date: Tue, 15 Jul 2003 00:53:09 +0200 From: Francesco Casadei To: othermark Message-ID: <20030714225309.GA904@goku.kasby> Mail-Followup-To: othermark , freebsd-questions@freebsd.org References: <20030713105532.GA856@goku.kasby> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.8-STABLE i386 cc: freebsd-questions@freebsd.org Subject: Re: IPv4/IPv6 dual-stack, IPv4-only and IPv6-only X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2003 22:53:15 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 14, 2003 at 04:46:40PM +0000, othermark wrote: > Comments in-line: >=20 > In article <20030713105532.GA856@goku.kasby>, Francesco Casadei wrote: > >=20 > > --UlVJffcvxoiEqYs2 > > Content-Type: text/plain; charset=3Dus-ascii > > Content-Disposition: inline > > Content-Transfer-Encoding: quoted-printable > >=20 > > I need to setup an IPv4/IPv6 dual-stack host, >=20 > This works as default. Just ifconfig your ipv6 address. >=20 > > IPv4/IPv6 dual-stack host connected to the 6bone through freenet6.=20 >=20 > Works with the freenet port. What this basically does is tunnel the > the ipv6 traffic between two ipv4 hosts. >=20 > > act as an IPv6 gateway for the other PC, configured as an IPv6-only hos= t and > > IPv4-only host by installing twice FreeBSD and using dual-boot. > >=20 > > Is this possible to achieve? Does anybody know how to do this? Furth= ermo=3D >=20 > Your setup is reasonable. You don't even need to dual boot the client > behind the firewall, let it run dual/stack too. However, your setup=20 > will work the best if both the firewall and the client have publicly > routeable ipv4 addresses. In other words NATing ipv4 via your > firewall will probably break things. Ipv6 traffic from your client to=20 > your freenet6 enabled ipv6 router should work just fine. >=20 > > re, > > how can an application detect system's configuration (IPv4/IPv6, IPv4-o= nly, > > IPv6-only)? >=20 > By looking at the configured address. Most applications that are > enabled for ipv6 are capable of running both ipv4 or ipv6 by > abstracting the ipaddress type and changing to use a few different > function calls (inet_ntop and inet_pton mainly). >=20 > --- > Mark > atkin901 at NOSPAM yahoo dot com > (!wired)?(coffee++):(wired); >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" > end of the original message I'm already trying to configure a 6to4 tunnel to the 6bone through freenet6, but as you've pointed out it doesn't work with a private IPv4 address behind NAT. I don't have a public IPv4 address to do static NAT to the dual-stack host, so I will try to set the router in bridge-mode and use PPTP-to-PPPoA and mpd to connect the dual-stack host to the Internet with the public IPv4 address given by my ISP. Regarding my previous question ("how can an application detect system's configuration?"), what I was really asking is: a failing socket(AF_INET, ..= .) syscall with error EINVAL can be considered a test for an IPv6-only host? Similarly, a failing socket(AF_INET6, ...) syscall with error EINVAL can be considered a valid test for an IPv4-only host? Francesco Casadei --=20 You can download my public key from http://digilander.libero.it/fcasadei/ or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...) Key fingerprint is: 1671 9A23 ACB4 520A E7EE 00B0 7EC3 375F 164E B17B --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/EzRVfsM3XxZOsXsRAjzwAKCIbc7vZziskehxsRq7t4QmpdLV4wCeMmyh +AKww0T4TxIyqZi8+qhcd74= =+Yah -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--