Score:0

Free BSD IP forwarding for LVS NAT mode

vn flag

I am testing LVS NAT mode with centos as Keepalived node and FreeBSD as real server.
This question is already answered in context of Linux.
Now the question is how to make an L3 host as a default gateway for outgoing traffic on specific port (Policy Based Routing) eg. 8080. in FreeBSD
What I have done so far is
ipfw add 45 fwd "L3 ip" log all from me 8080 to any out via em0

#rc.conf
firewall_enable="YES"
firewall_type="open"
gateway_enable="YES"
firewall_logging="YES"
#sysctl.conf
net.inet.ip.forwarding=1
net.inet.ip.fastforwarding=1

LVS configuration is correct and tested with linux real servers.
After making the above changes in the FreeBSD real server, still it reaches client directly without going via L3 and the packets gets dropped at client.
After checking it for a couple of days without any success, now looking for the hands of experts.
Please provide an alternative approach too if available.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.