How can we assign a local source IP for a TCP session by SNAT?

Solution Verified - Updated -

Issue

Some remote server may allow access from only some particular client, How can we assign the source IP for a TCP session to the remote server if the local system has more than 1 IP address(Especially in case of server has 2 or more IP addresses in same subnet). 

Environment

  • Red Hat Enterprise Linux
  • iptables, SNAT
  • global secondary IP

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content