-
Notifications
You must be signed in to change notification settings - Fork 122
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
BPFire LoxiLB endpoint/backend server egress connection #718
Comments
gh-718 Initial support for IP masquerading
The masquerade functionality is supported now. How to use:
It will be supported over current loxicmd's firewalling capabilities. |
@UltraInstinct14 @TrekkieCoder just for clarification, in your example |
@vincentmli The portname is i think represents "green0" in BPfire terminology i.e. from where packets will come and "10.10.10.254" would be the red0's publicIP. Basically it means do masquerading/snat for packets arriving from eth1. |
@UltraInstinct14 @TrekkieCoder I tested BPFire with the new loxilb/loxicmd, it works great, thanks a lot for this work :)
|
LoxiLB 0.9.4 lack of SNAT feature for egress traffic initiated from BPFire green network, when loxilb is enabled, it breaks BPFire green network client Internet access, this issue is fixed in the loxilb development branch, temporarily I make loxilb development branch as 0.9.5 in BPFire so I could test the SNAT feature and it works. see detail in loxilb-io/loxilb#718 Signed-off-by: Vincent Li <[email protected]>
Ok, I noticed an odd behavior after applying the new firewall SNAT feature. use above BPFire network diagram as reference. green network client for example when I run
I also noticed while running tcpdump, no DNS query packet on if I delete the loxilb firewall snat rule, DNS resolution with |
gh-718 Fix masquerade for local destination
Thanks @vincentmli for bringing this up. I have merged a potential fix for this. Please double check once when you have time. |
@TrekkieCoder @UltraInstinct14 I tested the fix on BPFire, the DNS issue is resolved, thanks a lot for the fix, now I can surf Internet through BPFire with LoxiLB enabled 👍 |
LoxiLB 0.9.4 lack of SNAT feature for egress traffic initiated from BPFire green network, when loxilb is enabled, it breaks BPFire green network client Internet access, this issue is fixed in the loxilb development branch, temporarily I make loxilb development branch as 0.9.5 in BPFire so I could test the SNAT feature and it works. see detail in loxilb-io/loxilb#718 Signed-off-by: Vincent Li <[email protected]>
@TrekkieCoder @UltraInstinct14 I seem to find another bug that may be related to this, disable loxilb does not have the issue. with same network diagram, when I ssh from green network client green0 red0 I don't know if this is related to loxilb connection tracking (idle connection timeout?). but sometime I noticed even when I keep typing enter key on the ssh session in some random interval, the ssh session becomes "frozen" after some time. |
@vincentmli It is due to a ridiculously low connection timeout for snat ( As this is a new feature, cicd and other testing are still in dev). In the meantime, I will release a quick patch with increased connection time and incorporate more unit-tests. |
gh-718 Fix masquerade session inactivity timeout
The timeout issue has been fixed. There is still a known issue where loxilb is not sending tcp reset after session inactivity for masqueraded sessions. Will update after fix. |
Thanks a lot for the quick fix! |
LoxiLB 0.9.4 lack of SNAT feature for egress traffic initiated from BPFire green network, when loxilb is enabled, it breaks BPFire green network client Internet access, this issue is fixed in the loxilb development branch, temporarily I make loxilb development branch as 0.9.5 in BPFire so I could test the SNAT feature and it works. see detail in loxilb-io/loxilb#718 Signed-off-by: Vincent Li <[email protected]>
gh-718 Fixed tcp reset for session inactivity
LoxiLB 0.9.4 lack of SNAT feature for egress traffic initiated from BPFire green network, when loxilb is enabled, it breaks BPFire green network client Internet access, this issue is fixed in the loxilb development branch, temporarily I make loxilb development branch as 0.9.5 in BPFire so I could test the SNAT feature and it works. see detail in loxilb-io/loxilb#718 Signed-off-by: Vincent Li <[email protected]>
gh-718 Added cicd for ipmasquerade
Is your feature request related to a problem? Please describe.
Here is the BPFireOS deployment network diagram with LoxiLB enabled
Ingress traffic from workstation
10.0.0.171
to LoxiLB lb10.0.0.68
which load balance to backend172.16.1.9
works fine. but egress traffic initiated from backend172.16.1.10
to workstation10.0.0.171
or to Internet failfor example ping workstation
10.0.0.171
from backend172.16.1.9
tcpdump on BPFire
red0
interfacetcpdump on workstation
10.0.0.171
so the workstation responded with ICMP echo reply, but red0 interface tcpdump does not show the echo reply from workstation, the echo reply appears to be dropped either by BPFire red0 interface with loxilb TC ebpf program attached or before hitting BPFire red0 interface?
note if I disable loxilb on BPFire so TC eBPF program got removed from both
red0
andgreen0
interface, the egress ping works because BPFire will do SNAT from netfilter from172.16.1.9 -> 10.0.0.171
to10.0.0.232 -> 10.0.0.171
Describe the solution you'd like
This is egress traffic scenario initiated from endpoint/backend server, which I am not sure if LoxiLB supports or not, I don't know if LoxiLB doing SNAT similar to netfilter would work out the problem or not
Describe alternatives you've considered
In traditional load balancer, there is so called "wildcard listener", meaning a LB or VIP listening on wildcard ip port combination
0.0.0.0:0
, when backend172.16.1.9
initiate traffic to Internet, wildcard listener0.0.0.0:0
will pickup the traffic and do the connection tracking or address translation (SNAT/DNAT) to allow the egress traffic works.Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: