networking - How can I use my server's IPv6 connection from my computer's IPv4?

24
2014-04
  • Jeremy Banks

    I have a server that has IPv6 and IPv4 support. I would like to use this to allow my desktop, which has an IPv4-only connection, to connect to other servers via IPv6. What type of software is necessary, on the server and on the desktop, to enable this?

    The server is running Ubuntu Linux 10.04 LTS and the desktop is running Mac OS X 10.6.7.

  • Answers
  • slubman

    This question has been answered on ServerFault. The solution is to use a device tunneling instead of the socks proxy.

  • RedGrittyBrick

    For a specific connection you could use a socat relay.

    You install socat on the server and have it run (e.g. via a startup script) so as to set up an IPV4 to IPV6 relay.

    Here's a simple IPV4 to IPV6 TCP relay for an IPV6 web server.

    socat TCP4-LISTEN:www TCP6:www.example.com:www
    

    The client connects to the relay's IPv4 address.

  • ceving

    You have to convert your server into a IPv6 router and make it the default gateway for your desktop systems. Here is a description how to do this: http://tomicki.net/ipv6.router.php

  • Jeremy Banks

    Apparently an ordinary SSH tunnel mostly works for web browsing, if you don't mind proxying all of your IPv4 traffic as well. That's just running

    ssh -D 1234 my-server.com
    

    on your computer and configuring your operating system and/or browser to connect via the SOCKS proxy on localhost:1234.

    "Mostly" works? I used http://test-ipv6.com/ to evaluate this solution for web browsing.

    • In Chrome and Safari every test passes except for "Test IPv6 without DNS".
    • In Firefox every test passes except for "Test if your ISP's DNS server uses IPv6".
    • Opera can't use a SOCKS proxy.

    I imagine that setting up a VPN would make everything work properly.

  • harrymc

    As you say that your ISP doesn't support iPv6, you need iPv6 over IPv4, called also “6 to 4”.

    One method is presented in Connecting to an IPv6 address using IPv4 :

    1. Choose Apple menu > System Preferences, and then click Network.
    2. Click Add (+) and then choose “6 to 4” from the Interface pop-up menu.
    3. Give the configuration a name, and then click Create.
    4. If you were given a relay address, choose Manually from the Configure pop-up menu and enter it. Otherwise, leave the Configure pop-up menu set to Automatic.

    The above method is demonstrated here with screenshots : IPv6 6to4 configuration for MacOS X


    Another method is detailed in Apple Mac OS X IPv6 :

    Mac OS X supports configured tunnels with the gif tunnel-interface. Setting up a manual tunnel requires several steps on the command line.

    Beforehand, you need the following information:

    $host-ipv4
        IPv4-address of the host
    $router-ipv4
        IPv4-address of the router/tunnel-server
    $tunnel-v6host
        (Tunnel) IPv6-address of the host
    $tunnel-v6router
        (Tunnel) IPv6-address of the router
    

    Set up the IPv4 endpoints of the tunnel:

    ifconfig gif0 tunnel $host-ipv4 $router-ipv4 
    

    Set up the IPv6 endpoints of the tunnel:

    ifconfig gif0 inet6 alias $tunnel-v6host $tunnel-v6router prefixlen 128
    

    Set the (IPv6) default route on the tunnel:

    route add -inet6 default -interface gif0
    

    I cannot test any of the methods, not having a Mac.


    You can also try and find a tunnel broker that gives you an IPv6 in IPv4 address. You will get a IPv6 address, with which you can browse the IPv6 internet.

    Most tunnel brokers require you to have the tunnel open 24/7, though. A number of big tunnel brokers have been set up, among which are in europe sixxs.net , in canada freenet6.net and Hurricane Electric.


  • Related Question

    networking - IPv6 - Public IPs, private IPs, IPs derived from the MAC address? Confused!
  • sinni800

    I'm pretty much excited for IPv6 because of the large address room and (potential?) owning of more than one IP, or even tens of IPs (/122 subnet?)

    Though one magazine has now confused me.

    In a current issue (no. 3) of "CT", a German computer magazine, I read that when using IPv6 your IP address consists of your MAC address and various other things, and that this address will be public on the web, no matter what access point / LAN you connect to.

    My knowledge of IP(v6) is in contrary of this. I thought you will normally always have a a local network IP and NAT takes care of your Internet access, and your provider gives the NAT router an IP.

    I've heard of the 6to4 interface, but does this one give you your own ip in the IPv6 net?

    Personally I hope it still is through a personal IP space (like 192.168, 127.16-31, 10. in IPv4) in private networks with a NAT going to the Internet. And also I hope that providers will offer subnets to private customers so they don't have to use NAT anymore. Yay for converting your LAN into the WAN and using better security (so Computers from the same subnet still get access rights like normal).


  • Related Answers
  • Olli

    Your magazine is right. IPv6 address consists of two parts: network prefix and host address.

    If host address is not assigned, then computer autogenerates it, usually by using MAC address. Which means your IP includes something that uniquely identifies you, not depending on what network you are using.

    See for example Wikipedia page for more information. There is also another post in superuser.com explaining how to disable using MAC address in different operating systems.

  • Brian

    There is no "private" IP addresses in IPv6. (There is LinkLocal, but that is a bit different).

    NAT Will no longer exist. Most companies trialing it, such as comcast, are giving out 32 bit addresses to each consumer modem. that would give you 4 billion IP addresses to use with your connection. (right about how many IPv4 Addresses there are in the world right now)

    Firewalls will still be critical, but will not have to do NAT anymore. Things like person to person video chat will really work correctly.

  • Tacticious

    There are only public IP addresses in IPv6. Thus, no NATing will be required at all.

    The smallest block of IPs possible will be in the thousands, not just a few. Each person will be allocated thousands of IPv6 addresses.

    There will be enough IPv6 addresses for every molecule on the face of the earth to have its own address (not inside the earth as well, just the face).