loxilb-io / loxilb

eBPF based cloud-native load-balancer for Kubernetes|Edge|Telco|IoT|XaaS.
https://www.loxilb.io
Apache License 2.0
1.36k stars 108 forks source link

Can loxilb work as non-default gateway? #464

Closed liyimeng closed 8 months ago

liyimeng commented 9 months ago

I learn loxilb from reddit. A Quick Look on the docs, seem fuallnat is supported. but when I see through all the demo topology, LB node is always serving as default gateway as the same time. I am not sure if this the case, or it is just a coincident.

Anther question is, when working in fullnat, it is possible for real server to see the client real IP address, but not the gateway IP address?

nik-netlox commented 9 months ago

Hello @liyimeng, Yes, LoxiLB can work as a non-default gateway. And, it is not possible to see client's real IP address when you use fullnat mode.

liyimeng commented 8 months ago

@nik-netlox Thanks for your answer! Client IP might good to have since fail2ban-liked program need it. I google around, only find some hacky way to solve the problem. it is a pity.

nik-netlox commented 8 months ago

@liyimeng, To preserve client's IP address, you must use default mode. If you have deployed loxilb as default gateway then it is fine otherwise there are two options: 1) Put selective routes for return traffic (if you know client's IP range) to go towards loxilb. 2) Or use loxilb with DSR mode.

liyimeng commented 8 months ago

Thanks @nik-netlox I got it!