Another option is to configure a layer 4 virtual with a pool as the gateway next hop (example below):
ltm virtual v4_nexthop {
destination 0.0.0.0:any
mask any
pool 192.168.0.1
profiles {
fastL4 { }
}
source 192.168.0.128/28
translate-address disabled
translate-port disabled
vs-index 7
}
ltm pool 192.168.0.1 {
members {
192.168.0.1:telnet {
address 192.168.0.1
session monitor-enabled
state up
}
}
monitor gateway_icmp
}
Alternatively, you can use just a layer 3 forwarding VIP and add the following iRule:
ltm rule v4_next_hop {
when CLIENT_ACCEPTED {
nexthop internal 192.168.0.1
log local0. "[IP::remote_addr]:[TCP::remote_port] > [IP::local_addr]:[TCP::local_port]"
}
}
Either works fine for sending traffic to a gateway other than what is configured in the TMOS routing table.