Replies: 13 comments 1 reply
-
Hi @futurecad - Can you share a bit more about your use case? Where are you seeing the IP of the relay server, and what are you using it for? |
Beta Was this translation helpful? Give feedback.
-
The relay node forwards the traffic to the internal web management platform. The policy cannot audit the visitor's real IP. The audit content needs to obtain the visitor's real IP. |
Beta Was this translation helpful? Give feedback.
-
@futurecad Packets coming out of the Nebula interface should contain the correct Nebula source IP of the original host (not the relay.) I suspect you are looking at the packets coming in on the physical link (i.e. the computer's NIC) which will have a source IP set to the underlay (i.e. WAN or LAN) IP of the relay. It is not possible to change the source IP of these packets and maintain connectivity. If I'm misunderstanding your goal, please let me know and I'll reopen the ticket. |
Beta Was this translation helpful? Give feedback.
-
Client mac (nebula ip: 10.1.1.3, intranet ip: 192.168.3.151) |
Beta Was this translation helpful? Give feedback.
-
Hi @futurecad - In your initial post you mentioned relays which is the term for a Nebula concept where a relay node forwards end-to-end encrypted traffic between two other Nebula nodes that otherwise cannot communicate (e.g. due to a problem with a NAT gateway in between them.) When using relays, the source IP address, as seen by the destination, will match the node that initiated traffic - not the relay. However, if I now understand your problem correctly, you are using unsafe_routes to forward traffic from a Nebula node, through another Nebula node, to a destination which does not run Nebula. Am I understanding correctly?
The masquerade rule you have installed on your router is the reason your packets arrive at the destination with a source IP set to the router's address. The rule tells the system to rewrite the source so that return traffic is sent back to the router, which can then forward it back on to the Nebula network. To avoid modifying the source address in the packets that arrive at the destination, you can remove the masquerade rule, but you will instead need to add an entry to the routing table on all the hosts you are exposing with your That being said, Nebula works best when you install it on all of your hosts, so that you can leverage end-to-end encryption and fine-grained access control using the built-in firewall. :) |
Beta Was this translation helpful? Give feedback.
-
I'm using unsaferoutes to forward traffic from one nebula node to another destination that doesn't run nebula。 Configuration of my client:
My lighthouse node and relay node configuration:
Subnets configured by my relay node:
I'm not sure how I should change it so that I can log the actual or virtual ip of my client mac when I access the 192.168.24.64 service (10.1.1.3) |
Beta Was this translation helpful? Give feedback.
-
Hi @futurecad - I gave instructions on how to achieve what you're looking for in my last reply. Is there anything I can help you with at this point?
|
Beta Was this translation helpful? Give feedback.
-
IP route add 10.1.1.0/24 via 192.168.3.151 |
Beta Was this translation helpful? Give feedback.
-
Removing the masquerade rule will cause the packets to arrive at the destination with the source IP set to the Nebula IP of the client accessing it. But to enable return traffic... Every host that doesn't run Nebula - so all of the ones in the following range that you're configuring as routes:
Will need to have an appropriate route manually added (e.g.
This is error is saying you have an unsafe_route in the config set to the Nebula network's address space. |
Beta Was this translation helpful? Give feedback.
-
OK thank you |
Beta Was this translation helpful? Give feedback.
-
I added on access to internal machines that are not installed |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
When I delete the NAT rule of the relay node |
Beta Was this translation helpful? Give feedback.
-
What version of
nebula
are you using? (nebula -version
)1.8.2
What operating system are you using?
linux macos
Describe the Bug
After relay, what the intranet server gets is the ip of the relay server. How to get the actual virtual ip?
Logs from affected hosts
Config files from affected hosts
Beta Was this translation helpful? Give feedback.
All reactions