• Stars
    star
    171
  • Rank 222,266 (Top 5 %)
  • Language
    Shell
  • Created almost 9 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

IPv6-in-IPv4 Tunnel Server

IPv6-in-IPv4 Tunnel

Author: sskaje (http://sskaje.me/)

You can set up your own tunnelbroker.net!

More to read: (http://sskaje.me/2016/01/be-your-own-tunnelbroker-net-iproute2/)

Commands

Add

Create a new tunnel, tunnel_id=1, remote ip 211.100.11.11

./bin/6to4 add 1 211.100.11.11

Update

Change remote ip to 211.100.11.12 for tunnel_id=1

./bin/6to4 update 1 211.100.11.12

Delete

Delete tunnel tunnel_id=1

./bin/6to4 del 1

Config

Config file locates at etc/config.ini

Case: You have 2400:1234:1234:1200::/56 routed to your VPS, eth0 is your internet network device.

IPV6_NETWORK

IPv6 network , must be ending with '::'

IPV6_CIDR

IPV6 CIDR, must be a multiple of 8, accepted CIDR: 8,16,24,32,40,48,56,64,72,80,88,96.

If your IPV6_CIDR is smaller than /64, assigned blocks are /64; if smaller than /48, /48 is used.

If IPV6_CIDR is greater than /64, assigned blocks are /(IPV6_CIDR + 16 [ + 8 ]), e.g.: 64->80, 72->96, 80->96

INTERFACE

Bind tunnel to device INTERFACE

BIND_IP

Bind a specific IP from $INTERFACE, this is optional, if it's not set, script reads first IP from $INTERFACE

LINK_MTU

MTU, default to 1480

Settings for http API

Add following to /etc/sudoers

php-user ALL=(ALL) NOPASSWD: /path/to/v6/bin/6to4

Add following to nginx vhost

rewrite ^/v6/(.+)$ /v6/cgi/$1 break;
location ~ ^/v6 {
    auth_basic "Username: tunnel id; Password: Secret.";
    auth_basic_user_file $document_root/v6/etc/htpasswd;

    fastcgi_split_path_info ^(.+\.php)(/.+)$;

    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
}

Add user for tunnel id 0

htpasswd etc/htpasswd 0

Client Settings

Clients configuration on Debian

auto ss-ipv6
iface ss-ipv6 inet6 v4tunnel
        address 'Client IPv6 Address'
        netmask 80
        gateway 'Server IPv6 Address'
        endpoint 'Server IPv4 Address'
        local 0.0.0.0
        ttl 255

Update EndPoint IP

curl --silent --user 'TUNNEL_ID:PASSWORD' http://your.v6.api.domain/v6/update.php

You can also add this to your crontab or somewhere like /etc/network/if-up.d/

EOF

More Repositories

1

mqtt

MQTT Client class
PHP
86
star
2

appstore

iTunes Appstore protocol
PHP
84
star
3

unzip-lzfse

Adding lzfse support for unzip-6.0
C
73
star
4

disable_aslr

Disable ASLR/PIE for Mach-O binaries.
Python
43
star
5

mh

A memory editor for iOS/macOS with JavaScript support
C
39
star
6

ubnt-clash

Clash config/op templates for ubnt EdgeRouters / VyOS
Shell
31
star
7

mosquitto_auth_plugin_md5

A simple test auth plugin for mosquitto(http://mosquitto.org)
C
26
star
8

hive_merge

Merge Small files for Hive Table on HDFS
Python
15
star
9

xunlei

迅雷离线远程下载服务,提交链接,自动下载到NAS
PHP
14
star
10

mitm

PHP Man-in-The-Middle Proxy for TCP connections
PHP
9
star
11

weixin

微信公众平台API开发框架
PHP
7
star
12

radb

query ip ranges from radb.net
PHP
4
star
13

ip_calc

IP calculator, ipv4 only.
PHP
4
star
14

apns

simple apns client & proxy class
PHP
3
star
15

12306

12306 bot
3
star
16

image_thumbnail_proxy

Lazy thumbnail proxy based on nginx + php
PHP
3
star
17

apple-silicon-ai-notes

Shell
3
star
18

gnutls-ca

GnuTLS CA scripts
Shell
2
star
19

edgeos-pyweb

python web scripts from edgeos, this repository is created from EdgeRouter X 1.9.7
HTML
2
star
20

gspxy

A Google Chrome extension to proxy static files hosted by Google.
JavaScript
2
star
21

tesseract_12306

Tesseract training script for 12306
Shell
2
star
22

diff

老代码,在线比较文本,找相同、不同、在左不在右和在又不在左,支持文件上传。
PHP
2
star
23

vmware_windows_10_shared_folder_fixer

Fix VMware Windows 10 Guest shared folder.
Visual Basic
1
star
24

EnumExtractor

Extract Enum from Dumped DLL generated by Il2cppDumper
C#
1
star
25

jsonrpc

JSON RPC Client
PHP
1
star
26

etas-mirror

ETAS.com mirror for China users, just a backup for lua scripts and nginx conf
JavaScript
1
star
27

merlin-pbr

Shell
1
star
28

base_converter

Base64 Encode/Decode, Base32 Encode/Decode, Base16 Encode/Decode, Base64(LSB first) Encode/Decode, Base32(LSB first) Encode/Decode, Base16(LSB first) Encode/Decode,
PHP
1
star
29

cloudera_mirror

Mirroring http://archive.cloudera.com with wget.
PHP
1
star
30

baiducoordinateconverter

BaiduCoordinateConverter, convert coordinates between LL & MC.
PHP
1
star