IPv6 proxy on VPS
This draft article only for remembering
Host company with ipv6 /64 network
https://www.vpsag.com/
Script for ganarate ipv6 on python3
#!/usr/bin/env python3
"""
Generate a random IPv6 address for a specified subnet
"""
from random import seed, getrandbits
from ipaddress import IPv6Network, IPv6Address
subnet = '2001:db8:100::/64'
seed()
network = IPv6Network(subnet)
address = IPv6Address(network.network_address + getrandbits(network.max_prefixlen - network.prefixlen))
print(address)
"""
Generate a random IPv6 address for a specified subnet
"""
from random import seed, getrandbits
from ipaddress import IPv6Network, IPv6Address
subnet = '2001:db8:100::/64'
seed()
network = IPv6Network(subnet)
address = IPv6Address(network.network_address + getrandbits(network.max_prefixlen - network.prefixlen))
print(address)
Generate 1000 ip
$ for ip in {1..1000}; do python random-ipv6-addr.py ; done
add ipv6 address to interface from file
cat iplist1.txt | while read ip;do ip -6 addr add $ip dev eth0; done
https://ip6.sh/ can be used to ganarate IPs
example
https://blog.vpsville.ru/blog/howto/133.html
Comments
Post a Comment