title: Binding CXF Client source IP address
body: <p>I have a CXF client that connects to a Web Service. This client is installed in a machine tha has two IP addresses in the same network (for example 172.16.1.101 and 172.16.1.102).</p>
  
  <p>How can I configure the CXF client to use a specific source IP address, so that the server sees the requests coming from that specific IP address and not the other?</p>
  
  <p>If I had access to the Socket, I would do something like:</p>
  
  <pre><code>Socket s = new Socket(); 
  s.bind(new InetSocketAddress("172.16.1.102", 0));  //this Ip address is the one I need to specify
  s.connect(new InetSocketAddress("google.com", 80));
  </code></pre>
  
  <p>Is it possible to configure the Sockets created by CXF so I can specify the source IP address?</p>
  
  <p>EDIT: I need to specify the source IP address because between the client and the web server there is a firewall that has rules for one of the IP addresses (connections coming from the other IP address are blocked).</p>