Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please help, I get nothing when trying this method. #2

Closed
firestarter7924 opened this issue Feb 24, 2024 · 14 comments
Closed

Please help, I get nothing when trying this method. #2

firestarter7924 opened this issue Feb 24, 2024 · 14 comments
Labels
question Further information is requested

Comments

@firestarter7924
Copy link

Hello
First, thanks for your work
I have VPS with IPV6 /56 under Ubuntu 22.04 and home PC. I use tunnel from hurricane and wanna use my own 6in4 tunnel. Then i tried your scrypt. And i got nothing. Please help.
This is installatiobn log, that is all what i have, there is no server log or client log...

Will use gre protocol for ipv6 tunnel creation
将使用gre协议进行ipv6隧道创建
脚本当天运行次数:8,累计运行次数:1340
Updating package management sources
Installing dos2unix
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
dos2unix
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 384 kB of archives.
After this operation, 1367 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 dos2unix amd64 7.4.2-2 [384 kB]
Fetched 384 kB in 0s (1845 kB/s)
Selecting previously unselected package dos2unix.
(Reading database ... 106410 files and directories currently installed.)
Preparing to unpack .../dos2unix_7.4.2-2_amd64.deb ...
Unpacking dos2unix (7.4.2-2) ...
Setting up dos2unix (7.4.2-2) ...
Processing triggers for man-db (2.10.2-1) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 6.5.0-21-generic
NEEDRESTART-KEXP: 6.5.0-21-generic
NEEDRESTART-KSTA: 1
Installing ipcalc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
ipcalc
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 25.4 kB of archives.
After this operation, 73.7 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 ipcalc all 0.42-2 [25.4 kB]
Fetched 25.4 kB in 0s (275 kB/s)
Selecting previously unselected package ipcalc.
(Reading database ... 106509 files and directories currently installed.)
Preparing to unpack .../archives/ipcalc_0.42-2_all.deb ...
Unpacking ipcalc (0.42-2) ...
Setting up ipcalc (0.42-2) ...
Processing triggers for man-db (2.10.2-1) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 6.5.0-21-generic
NEEDRESTART-KEXP: 6.5.0-21-generic
NEEDRESTART-KSTA: 1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
iproute2 is already the newest version (5.15.0-1ubuntu2).
iproute2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
net-tools is already the newest version (1.60+git20181103.0eebece-1ubuntu5).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
IP area being detected ......
CDN available, using CDN
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openssl is already the newest version (3.0.2-0ubuntu1.14).
openssl set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
This step will take about 1 minute, please be patient.
在此步骤中将停留约 1 分钟,请耐心等待
root@xxx:~# systemctl status ndpresponder
Unit ndpresponder.service could not be found.

@firestarter7924 firestarter7924 changed the title Please help, I het nothing when trying this method. Please help, I get nothing when trying this method. Feb 24, 2024
@spiritLHLS
Copy link
Contributor

spiritLHLS commented Feb 25, 2024

图片
图片
图片
In fact you should see an output log similar to the one above.
It seems to me that my project can't recognise your IPV6 subnet, recognising it as a non-creatable tunnel situation now.
You may need to run the following command on your Ubuntu to ensure that your IPV6 subnet is available:

curl -L https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

@spiritLHLS spiritLHLS added the question Further information is requested label Feb 25, 2024
@firestarter7924
Copy link
Author

firestarter7924 commented Feb 25, 2024

Без имени

@spiritLHLS
Copy link
Contributor

spiritLHLS commented Feb 25, 2024

Ok, this confirms that the subnet is available.
Now I've added a new piece of code to the script https://github.com/oneclickvirt/6in4/blob/main/6in4.sh#L306
so you can re-download the script and run it and see if there's any line that's not outputting like:

    echo "ipv6_address: $ipv6_address"
    echo "ipv6_prefixlen: $ipv6_prefixlen"
    echo "ipv6_gateway: $ipv6_gateway"
    echo "ipv6_address_without_last_segment: $ipv6_address_without_last_segment"
    echo "interface: $interface" 
    echo "ipv4_address: $ipv4_address" 
    echo "ipv4_prefixlen: $ipv4_prefixlen" 
    echo "ipv4_gateway: $ipv4_gateway" 
    echo "ipv4_subnet: $ipv4_subnet"

@firestarter7924
Copy link
Author

firestarter7924 commented Feb 25, 2024

now it works, thanks
Без имени1

@spiritLHLS
Copy link
Contributor

now it works, thanks Без имени1

Is there any value whose output is empty? That is, which is the line with no content after the colon? There should be at least one value that is empty causing your problem

@spiritLHLS
Copy link
Contributor

spiritLHLS commented Feb 25, 2024

As per the diagram you showed, I seem to see that the value of ipv6_gateway is empty.

cat /usr/local/bin/6in4_ipv6_gateway

@firestarter7924
Copy link
Author

cat /usr/local/bin/6in4_ipv6_gateway
got nothing...

@spiritLHLS
Copy link
Contributor

spiritLHLS commented Feb 25, 2024

Found the problem, my project didn't recognise your IPV6 gateway, so the subsequent tunnel setup etc. couldn't be executed, I need you to run the following commands again to see what output you get

ip -6 route show | awk '/default via/{print $3}'

To avoid privacy breaches, you can code everything after the first decimal point. For example, for 8.7.6.5, I only need to know the 8 part of it.

cat /usr/local/bin/6in4_ipv6_gateway got nothing...

@firestarter7924
Copy link
Author

image
Nothing

@spiritLHLS
Copy link
Contributor

ip -6 route show

image Nothing

@firestarter7924
Copy link
Author

Без имени2

@spiritLHLS
Copy link
Contributor

图片
It looks like I need a patch to detect the writing of gateway for IPV6 in another format, which is currently the only format my command recognises.

@firestarter7924
Copy link
Author

will wait.. thanks.

@spiritLHLS
Copy link
Contributor

will wait.. thanks.

Adapting multiple network interfaces is not universal, I'll write later in the note that if you encounter multiple network interfaces, you can solve the problem yourself by manually writing the IPV6 gateway in the /usr/local/bin/6in4_ipv6_gateway file.

For you, it's the IPV6 address after writing to nexthop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants