0

I have requirement to PAT two different public IP [same port] to single load balancer local IP [VIP] in different ports using a Cisco FWSM.

Ex:

static(LB,outside) 10.0.0.1 www 192.168.100.1 8282 mask 255.255.255.255
static(LB,outside) 10.0.0.2 www 192.168.100.1 9292 mask 255.255.255.255

Is the above is possible or any other suitable solution is available?

Falcon Momot
  • 25,244
  • 15
  • 63
  • 92

1 Answers1

0

Technically, yes. Supposing you were using iptables, the rules to apply to the device with the two publicly-routeable IP addresses look like this:

iptables -t nat -A PREROUTING -i $WAN_INTERFACE -d $IP_1 -p tcp --dport $PORT_1 -j DNAT --dnat-to $LOAD_BALANCER_IP:$LOAD_BALANCER_PORT_1

So, yes, what you want to do is simply DNAT predicated upon the destination port (and necessarily protocol - specify TCP or UDP or create two rules, usually) as well as the incoming interface and destination IP. Any device capable of DNAT should be able to accept these predicates and DNAT to a specific IP and port.

With your cisco FWSM device, the rule to put in your context will look like:

static (inside,outside) tcp <WAN IP 1> <WAN port> <load balancer IP> <load balancer port 1> netmask 255.255.255.255
Falcon Momot
  • 25,244
  • 15
  • 63
  • 92