Forum Discussion
IP Forwading VIP - Access List
Hi,
I've put together the following iRule to prevent two subnets communicating via the virtual forwarding VIP.
We have several VLANS behind the LTM and two of which cannot communicate with each other for compliance reasons. We use a forwarding VIP so that web servers can make out bound calls and we can connect to each individual web server over a WAN connection for testing purposes.
I did consider changing to using SNATs and removing the forwarding VIP, however this would also require changes on firewalls and routers and subsequently could get quite messy.
What I'd like to ask is if the following iRule looks correct (I currently lack a test environment to confirm this)
Or if SNAT would be a better solu
tion to prevent the two VLANS from communicating.
Thanks in advance
Lee
when CLIENT_ACCEPTED {
if ip src = win_web_LIVE_front and dst = linux_web_LIVE_front
if {
( [class match [IP::client_addr] equals win_web_LIVE_front_subnet])
and
( [class match [IP::local_addr] equals lin_web_LIVE_front_subnet])
}
{
log local0. "DENIED TRAFFIC Windows to Linux: [IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port]"
send TCP RST
reject
else if ip src = linux_web_LIVE_front and dst = win_web_LIVE_front
} elseif {
( [class match [IP::client_addr] equals lin_web_LIVE_front_subnet])
and
( [class match [IP::local_addr] equals win_web_LIVE_front_subnet])
}
{
log local0. "DENIED TRAFFIC Linux to Windows: [IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port]"
send TCP RST
reject
Permit all other traffic
} else {
log local0. "PERMITED TRAFFIC: [IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port]"
forward
}
}
- What_Lies_Bene1
Cirrostratus
Would a packet filter assigned to the two restricted VLANs not be a simpler solution? - Lee_Sutcliffe
Nacreous
I could put a VLAN access list on the switches I suppose, I tend to stear away from these as they can get quite messy.
Worth considering though I suppose
- What_Lies_Bene1
Cirrostratus
Apologies, I meant a packet filter on the BIG-IP. - Mohamed_Lrhazi
Altocumulus
Your iRule looks good. I would use it, instead of packet filters on BIGIP (I never used them or seen anyone use them). - nitass
Employee
i prefer using irule because i think it is more granular and flexible. - Mohamed_Lrhazi
Altocumulus
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com