Forum Discussion
dogg_dogg_23774
Nimbostratus
May 15, 2006analyzing tcp or udp port info in ip forwarding mode
Hi,
There is a requirement from customers that they want to forward ip packets only if the packets are icmp or the port number is greater than 1024.
However, when attempting to associate the rule with ip forwarding vs, I receive the following error. Is there anything that can be done to work around the error and accomplish the goal??
01070394:3: TCP::client_port in rule (tcp_test) requires an associated TCP profile on the virtual server (ipforward_test).
By the way, following is the rule I came up with....
when CLIENT_ACCEPTED {
if { [TCP::client_port] > 1024 } {
forward
}
elseif { [IP::protocol] == 1 } {
forward
}
else {
discard
}
}
thanks in advance...
- John_McInnes_44
Nimbostratus
- JRahm
Admin
Well, I was going to recommend utilizing the forwarder with a fancy packet filter, but it looks like the F5 packet filtering package doesn't support tcp/udp port range syntax, so a filter to support a standard iptables 1024:65535 port range would be painful indeed. - Chris__Bloss_10
Nimbostratus
Just want to add that I'm looking for a solution to the same issue. Trying to give hosts access back into another vlan on specific UDP and TCP ports. Has anyone found the work around? - JRahm
Admin
Set up one network virtual server (0.0.0.0/0) with protocol TCP, binding only to your internal vlan:virtual tcp_test-std_vip { destination any:any ip protocol tcp vlans internal enable rule tcp_forward-rule }
virtual udp_test-std_vip { destination any:any ip protocol udp vlans internal enable rule udp_forward-rule }
virtual icmp_test-fwd_vip { destination any:any ip forward ip protocol icmp vlans internal enable }
rule tcp_forward-rule { when CLIENT_ACCEPTED { if { [TCP::client_port] > 1024 } { forward } else { discard } } } rule udp_forward-rule { when CLIENT_ACCEPTED { if { [UDP::client_port] > 1024 } { forward } else { discard } } }
- Chris__Bloss_10
Nimbostratus
Either I'm missing something or my situation is a bit different. I need a host on VLAN2 to be able to initiate connections to the following IP:port conbinations on VLAN1. I'm not doing any load balancing just want to allow or reject the traffic. - JRahm
Admin
bloschr, your issue can be solved by creating a network virtual forwarder for vlan 2 enabled on vlan 1 and a forwarder for vlan 1 enabled of vlan 2. Then create packet filters as you've outlined above. No rules necessary. - unRuleY_95363Historic F5 AccountSheesh citizen, I was just going to suggest he use packet filters instead... But you are too fast...
- Chris__Bloss_10
Nimbostratus
I assume that will require I have routes set up in my core network on VLAN1 for IP's in VLAN2. I was trying to avoid that if possible - JRahm
Admin
maybe I misunderstand your configuration.... I assumed vlan 1 and vlan 2 are both defined on the LTM, is this not the case? If the LTM is not the default gateway for these vlan's, then you'll need to get a little more creative. Since this is appearing not to be heading in the direction of rules, feel free to shoot your requirements and a topology diagram to me at jason.e.rahm@erac.com, and I'll see if I can help. - John_McInnes_44
Nimbostratus
I found this post again through a search and thought that I would try it out.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects