BigIP Remove the source address of host

Hi,

I have problem with F5 BigIp, i have created vip ip address (192.168.1.3) for two nodes (192.168.1.1 and 192.168.1.2)

any client ( example 10.1.1.1) access the virtual ip (192.168.1.3) will be shown at the servers as ip address of BigIp not the client address( 10.1.1.1), how can i let the BigIP show the ip address of host instead of ip address of self ip.

i have attached one photo for clarification

thanks BigIP expert :):):slight_smile:

first of all, i’m not an expert but just wann help if i can. :slight_smile:

what is nodes’ default gateway? is it bigip?

if so, would u mind trying to remove snat under virtual config?

the other way is to use x-forwarded-for http header.

sol4816: Using the X-Forwarded-For HTTP header to preserve the original client IP address for traffic translated by a SNAT

cheer!

hi and thx for reply,

nodes are the physical machine (server) there are two nodes (phyiscal machine) in diagram 192.168.1.2 and 192.168.1.1, it is not gateway or bigip

i have configured the virtual server (192.168.1.3) SNAT Pool to “automap”, should i return to “none”, i am new to bigip can you please tell me more about snat what it do ?

is it oridnary NAT ?

Big thanksssssssssssssssssss even if u r not expert :):slight_smile:

SNAT is literally Source-NAT. Basically its telling the VS to act as a proxy… So the backend (Poolmembers) see the IP connection coming from one of the BigIP’s addresses (Automap will use the floating self-ip of the interface that routes to the poolmembers).

To have the client IP preserved, disable SNAT, enable NAT (The F5 then NAT’s the proxied connection back to the address and port of the client). The poolmembers then need to use the F5 (SelfIP) as the default gateway back to the client.

H

when i put the snat none, the virtual server is not working

how to enable nat ?

About 5 items below the SNAT option when configuring the Virtual Server. There’s separate options for ‘Address Translation’ and ‘Port Translation’. Select both. Then make sure the default gateway back to the client IP is via the F5 floating self-ip address that directly connects to the poolmembers. (I suspect that’s already done, unless you were running the poolmembers in a kind of n-path configuration)

I think it’s more likely that the only thing wrong is your poolmembers are routing back direct to the client via a separate router, since it looks like you’re running the F5 single armed (Sorry, can’t see your picture, so no network diagram to verify)…

H

when i put the snat none, the virtual server is not working

nodes are using bigip as their default gateway?

what is client ip address? it isn’t in virtual subnet (192.168.1.0), is it?

hi, in the attachment there is full diagram of what i am discussing

As Nitass and Hamish have suggested, if you have the default gateway on 192.168.1.1 and 192.168.1.2 set to the LTM self IP on the 192.168.1.0/24 subnet, you can set SNAT on the virtual server to none and the servers will see the original client IP address. As Hamish said, make sure to leave (destination) address and (destination) port translation enable on the virtual server properties.

Aaron

thanks Boss for yr reply i will try it and give my feedback

i have tried it i cant remote desktop or access http servers now , since i change the default gateway to ip of Bigip not coreswitch

any suggestion ?

would u mind posting your config here?

b self list

b route list

b virtual (virtual_server_name) list

b pool (pool_name) list

b self list

self 172.16.1.22 {

netmask 255.255.255.0

vlan VLAN_2

allow default

}

b route list

route 172.16.0.0/16 {

gateway 172.16.1.222

}

b virtual VS-Test list

virtual VS-Test {

translate service disable

snat automap

pool Pool- Test

destination 172.16.1.26:http

ip protocol tcp

profiles {

IntraSourceAdd {}

tcp {}

}

}

pool Pool- Test {

monitor all http

members {

172.16.1.20:http {}

172.16.1.30:http {}

}

}

what’s client ip? isn’t it in 172.16.0.0/24 subnet?

if yes, have u seen response packet from pool?

tcpdump -nni 0.0 port 80 and host client_ip and \(host 172.16.1.20 or host 172.16.1.30\)

*client_ip is client ip address

the virtual IP address : 172.16.1.26

two physical address 172.16.1.20 and 172.16.1.30

BigIp self ip 172.16.1.22

Cisco Core Switch 172.16.1.222

the two servers have the gateway of coreswitch 172.16.1.222

when i change it to Bigip address 172.16.1.22 both the servers stops

the client is on diiferenet subnet 172.16.2.0 /24

have u seen response packet from pool?

tcpdump -nni 0.0 port 80 and host client_ip and \(host 172.16.1.20 or host 172.16.1.30\)

*client_ip is client ip address

btw, do we need to disable icmp redirect on catalyst?

i did the command and i can c nothing as output

i change the sorce address to be the self ip 172.16.1.22 and i got the traffic

i did the command and i can c nothing as output

i change the sorce address to be the self ip 172.16.1.22 and i got the traffic

13:31:03.891043 IP 172.16.1.22.40083 > 172.16.1.20.80: . ack 1 win 46

13:31:03.891103 IP 172.16.1.22.40083 > 172.16.1.20.80: P 1:8(7) ack 1 win 46

13:31:03.894727 IP 172.16.1.20.80 > 172.16.1.22.40083: P 1:250(249) ack 8 win 260

13:31:03.895013 IP 172.16.1.22.40083 > 172.16.1.20.80: . ack 250 win 54

13:31:03.895072 IP 172.16.1.22.40083 > 172.16.1.20.80: F 8:8(0) ack 250 win 54

13:31:03.895076 IP 172.16.1.20.80 > 172.16.1.22.40083: F 250:250(0) ack 8 win 260

13:31:03.895957 IP 172.16.1.20.80 > 172.16.1.22.40083: . ack 9 win 260

13:31:03.896022 IP 172.16.1.22.40083 > 172.16.1.20.80: . ack 251 win 54