Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on LowEndTalk.com

In this Discussion

How to select which IPV6 to send a request from when having an IPv6 range?
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

How to select which IPV6 to send a request from when having an IPv6 range?

jukyjijukyji Member
edited June 13 in Help

Please keep in mind that I just started learning about IPv6.

I have bought a test VPS which says they give /112 IPv6 range. I understand it as they giving some IPv6 range and the owner of VPS (me) is able to select which IPv6 he wants to use. Therefore there should be many IPv6 possibilities and I want to test it. If I make this curl request

curl http://v4v6.ipv6-test.com/api/myip.php the result is 2a00:1630:66:d7::ae4c. Same with curl --interface 2a00:1630:66:d7::ae4c http://v4v6.ipv6-test.com/api/myip.php

Now if my VPS has an IP range of many IPv6 possibilities, how can I choose another IPv6 to send the request from, so that the destination server also sees another IPv6? Which symbols of 2a00:1630:66:d7::ae4c can I edit that my VPS would be able to bind to? Not sure if my explanation makes sense, so here is what I tried:

curl --interface 2a00:1630:66:d7::ae4c:0001 http://v4v6.ipv6-test.com/api/myip.php
curl: (45) Couldn't bind to '2a00:1630:66:d7::ae4c:0001'
ifconfig:

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255
inet6 addr: 2a00:1630:66:d7::ae4c/64 Scope:Global
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:11896 errors:0 dropped:0 overruns:0 frame:0
TX packets:1446 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17548894 (16.7 MiB) TX bytes:113342 (110.6 KiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.1.237 P-t-P:192.168.1.237 Bcast:192.168.1.237 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

Comments

  • mkshmksh Member

    @jukyji said: curl: (45) Couldn't bind to '2a00:1630:66:d7::ae4c:0001'

    Maybe it's a notation problem? IPv6 IPs are notoriously annoying to get right.

  • jukyjijukyji Member
    edited June 13

    sorry, no clue what you are talking about. First time dealing with IPv6 or multiple IPs in general. I find on google search results this command "ip addr" is used but have no idea how to use it in my case

  • mkshmksh Member

    @jukyji said: sorry, no clue what you are talking about. First time dealing with IPv6 or multiple IPs in general. I find on google search results this command "ip addr" is used but have no idea how to use it in my case

    Like some command expect IPv6 IPs to be enclosed by [ ] which in turn needs to be enclosed in ' ' to not mess with the shell.

  • jukyjijukyji Member

    soryr, no clue what you are talking about again. Could you just tell me what to do to achieve my goal? It should be simple 2-3 commands, I've no idea what

  • mkshmksh Member

    Well, no. It's your problem. Not mine. I just had an idea what might help. I am not going to solve your stuff but maybe someone else will. Good luck.

  • jukyjijukyji Member
    edited June 13

    I'm just asking a simple thing: how the fuck do I use 16bit of my ipv6 combinations that I have? There are genius experts in this forum!

    @willie

  • mkshmksh Member

    @jukyji said: There are genius experts in this forum!

    Yes, there are. Yet at least a good portion of them is not going to be all that eager to help when they feel that a person just wants to be spoonfed.

    Thanked by 2angstrom rm_
  • angstromangstrom Member
    edited June 13

    @jukyji said: I'm just asking a simple thing: how the fuck do I use 16bit of my ipv6 combinations that I have? There are genius experts in this forum!

    Wow, you signed only a little more than a hour ago, and you're already cursing and showing an attitude problem.

    "[T]he number of UNIX installations has grown to 16, with more expected." (K. Thompson & D. M. Ritchie, UNIX Programmer's Manual, 3ed, 1973)

  • LyphiardLyphiard Member, Provider

    Make sure your IP's are actually bound to an interface. For many linux distros, you can use a feature called AnyIP to bind a large range of IP addresses to an interface.

    ip route add local 2a00:1630:66:d7::ae4c:0/112 dev lo

    Nexril | Unmanaged cPanel Hosting, KVM VPS, and Dedicated Servers

  • jukyjijukyji Member

    @Lyphiard thanks man, but it doesn't help, I still get "Cannot assign requested address" when doing "curl --interface 2a00:1630:66:d7::ae4c:0001 http://v4v6.ipv6-test.com/api/myip.php"

  • angstromangstrom Member
    edited June 13

    Not entirely sure if I follow what the problem is, but what do you see in the control panel for your VPS? Usually, you can assign particular IPv6 addresses (from your /112) there.

    "[T]he number of UNIX installations has grown to 16, with more expected." (K. Thompson & D. M. Ritchie, UNIX Programmer's Manual, 3ed, 1973)

  • jukyjijukyji Member

    No options in console. First of all, maybe I misunderstood what IPv6 block is? Does IPv6 block with range of /112 mean I have 16bit of possible IPv6 combinations for free to use as I want?

    If yes, then how do I use them

  • angstromangstrom Member
    edited June 13

    @jukyji said: No options in console. First of all, maybe I misunderstood what IPv6 block is? Does IPv6 block with range of /112 mean I have 16bit of possible IPv6 combinations for free to use as I want?

    If yes, then how do I use them

    In practice, you probably should think of your /112 as corresponding to one IPv6 address. Not literally true, but in practice.

    Usually, the VPS provider assigns to the VPS a particular IPv6 address from the (in your case, /112) IPv6 subnet.

    "[T]he number of UNIX installations has grown to 16, with more expected." (K. Thompson & D. M. Ritchie, UNIX Programmer's Manual, 3ed, 1973)

  • jukyjijukyji Member

    So you are saying there is no way to send a request "from another ipv6", so that destination server would think it's a different person?

  • LyphiardLyphiard Member, Provider

    @jukyji said: So you are saying there is no way to send a request "from another ipv6", so that destination server would think it's a different person?

    It definitely is possible.

    Nexril | Unmanaged cPanel Hosting, KVM VPS, and Dedicated Servers

  • angstromangstrom Member

    @jukyji said: So you are saying there is no way to send a request "from another ipv6", so that destination server would think it's a different person?

    You have to add another particular IPv6 address from your /112 range. Which is why I was directing you to your provider's control panel. Usually, only one particular IPv6 is added to begin with.

    By the way, if it's not a secret, who is your VPS provider?

    "[T]he number of UNIX installations has grown to 16, with more expected." (K. Thompson & D. M. Ritchie, UNIX Programmer's Manual, 3ed, 1973)

  • angstromangstrom Member

    @jukyji said: So you are saying there is no way to send a request "from another ipv6", so that destination server would think it's a different person?

    Don't know what your intentions are, but if a particular IPv6 address from your /112 range is blacklisted, very probably the whole /112 range (or even a /64 range) will be blacklisted as well.

    "[T]he number of UNIX installations has grown to 16, with more expected." (K. Thompson & D. M. Ritchie, UNIX Programmer's Manual, 3ed, 1973)

  • jukyjijukyji Member

    it's lowendspirit VPS.

    No blacklist, I just want to test how IPv6 works.

    @Lyphiard then how do I do it?

  • tomletomle Member

    Login to the SolusVM panel and assign another IPv6 to your VPS.

    RIPE LIR: Contact me for ASN registrations/IPv6. No IPv4 space left.

  • jukyjijukyji Member

    there is no solusvm panel or anything, the control panel just has typical start/reboot/shutdown options

  • angstromangstrom Member

    @jukyji said: there is no solusvm panel or anything, the control panel just has typical start/reboot/shutdown options

    Then maybe ask on the LES forum?

    "[T]he number of UNIX installations has grown to 16, with more expected." (K. Thompson & D. M. Ritchie, UNIX Programmer's Manual, 3ed, 1973)

  • Since you've mentioned venet0 (and LES), I'll assume this is an OpenVZ VPS.

    Here's how you can use an address from your own range of /112 (or whatever):

    First explicitly add an address (that you want to use, the example I've picked below is from your own post) to the interface:

    ifconfig venet0 add 2a00:1630:66:d7::ae4c

    alternate versions (depending on your subnet):

    ifconfig venet0 add 2a00:1630:66:d7::ae4c/112

    Setup a default route for the address (may already be set but just in case):

    route -A inet6 add default dev venet0

    Now your address should be all set and if you use it as an outgoing source address it should work.

    One thing to note is that by default, the most recently added address will be the default outgoing address in the case of IPv6 and the way to change that behavior is to add the preferred_lft 0 option to the ifconfig ... add command.

    Hopefully this'll get you going.

    Thanked by 2kaktus69 angstrom
Sign In or Register to comment.