-
Notifications
You must be signed in to change notification settings - Fork 170
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
How to get UDP request source address #1506
Comments
Hello and thanks for the insightful question! Eventually it will help to know exactly which ziti tunnel client you are using (ziti-edge-tunnel? ziti-router with tunneler enabled?) and your current service configurations, but I can start by explaining the features that make it possible to project source IP. Are you aware of the
You can put any IP address[:port] in
You'll also need to whitelist any IPs that you want to project from the ziti tunnel client on the server. For this, the
There are some caveats:
|
@scareything Thank you for your answer! The requesters is a PC with Ziti's Windows client application(desktop-edge-win) installed. And the Ubuntu Linux Server installed with ziti-edge-tunnel. create identity
intercept config
hostv1 config
service config
bind polices
dial polices
After completing the above settings, All requester can send a udp request to 192.168.3.20:5000 through its 3000 port, and the device's 5000 port can also receive this udp request. Now this device needs to send data to the requester 3000 port. The program on the device only knows that the source IP of the udp request is 192.168.3.10. Therefore, the device will send a udp request to 192.168.3.10:3000, the Linux Severs's 3000 port can get the udp request. It is obvious that the requester's 3000 port will not receive this udp request. Because there are multiple requesters, I don't know how to forward the udp requests received on the Linux server to the original requester's 3000 port. |
Ok, so your service configurations will need to use the source address fields that I described in my previous message for the source IP to be used at the Linux server. You'll also need to name your identities as literal IP addresses for the "$tunneler_id.name" variable to work. Finally, you must use an edge router to do the tunneling on the Linux server. If your requesting applications are setting their source port 3000 then the device will be able to return traffic through that port. |
this is only needed if you need to know the sender real IP.
each UDP session/connection will gets its own source port on hosting tunneler, so you send reply to the source address of incoming packet it should make it to original sender |
no action in long time |
I have a usage scenario for device discovery where the requester and device communicate using the UDP protocol.
As shown in the figure, the requester(192.168.2.x) sends a udp request to the device(192.168.3.20), and the device needs to reply to the message through the udp request. However, the device does not know which requester sent the request.
It can only obtain the ip address of the Linux server(192.168.3.10)
So the device cannot return data to the requester.
I want to know how to obtain the source IP address of the requester (192.168.2. x). Or is it necessary to establish a service configuration from the device to the requester for communication.
Please help me! Thanks!
The text was updated successfully, but these errors were encountered: