Comments (6)
Congratulations, I have successfully implemented it according to what you said. It is a great tool.
I hope that we can specify the listening port of the server through parameters.
However, the client should not be able to work normally without a public IP. haha
from wiretap.
Currently he handshake has to be initiated from the client when doing nested hops. This means you can't use the --endpoint
argument when running ./wiretap configure
on the client or ./wiretap serve
on hop 2.
Instead, when you run the second ./wiretap configure
for hop 2 from your client, you take the resulting config file and add the Endpoint
Line to the peer section:
# wiretap_1.conf
[Interface]
PrivateKey = <private key>
Address = 192.168.0.2/32
Address = fd::2/128
ListenPort = 51821
[Peer]
PublicKey = <public key>
AllowedIPs = <routes exposed by second hop>
### Manually add this line:
Endpoint = <ip of hop 2>:<port>
###
Then you can bring up the second tunnel with wg-quick up./wiretap_1.conf
or whatever WireGuard client you're using. This causes your WireGuard interface to initiate the handshake through the first hop.
Happy to clarify more if needed!
from wiretap.
I generated the corresponding configuration file as you said, and added the Endpoint
field.
I first execute wg-quick up ./wiretap.conf
and everything works fine, execute wg-quick up ./wiretap_1.conf
but report an error RTNETLINK answers: File exists
.
wiretap is from client to hop1, and wiretap_1 is generated using wiretap configure --port 51821 --routes <routes exposed by second hop>
.
Is there something wrong with my operation.
from wiretap.
wiretap.conf
[Interface]
PrivateKey =<private key1>
Address = 192.168.0.2/32
Address = fd::2/128
ListenPort = 1080
[Peer]
PublicKey = <public key1>
AllowedIPs = <routes exposed by second hop>
wiretap_1.conf
[Interface]
PrivateKey = <private key2>
Address = 192.168.0.2/32
Address = fd::2/128
ListenPort = 1081
[Peer]
PublicKey = <public key2>
AllowedIPs = <routes exposed by second hop>
Endpoint = <ip of hop 2>:<port>
from wiretap.
Looks like you're almost there. That error is likely because the routes in your two configuration files overlap. Make sure wiretap.conf
only has the routes exposed by the first hop and wiretap_1.conf
has routes exposed by the second hop.
If you don't include the -d
option to wiretap configure
, an API address will also be included. I bet you just need to remove a::/128
from the AllowedIPs of wiretap_1.conf
from wiretap.
Great! Glad it worked. I plan to add better support for nested/multi-hop tunnels in the near future.
from wiretap.
Related Issues (10)
- Simple connect without RELAY + E2EE? HOT 5
- Not closing connection on RST HOT 1
- TCP Keepalive not forwarded to upstream origin server. HOT 9
- SYN-SENT userland timeout HOT 3
- High Memory usage per TCP connection HOT 11
- Using the client as a "proxy" server HOT 1
- WT & masscan. Only the first open port is reported HOT 3
- Gorgeous diagrams :heart_eyes: HOT 1
- Set Rlimit_NOFILE HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiretap.