-2

i have a server running debian with 2 ip address :

eth3   44.44.44.1
eth3:0 44.44.44.2

the problem is my outband request goes with second ip address "44.44.44.2"

how can i force OS to use primary ip address ?

  • 1
    Inbound? That is outside your system. Please clarify what you are trying to accomplish. Else this Q wil be closed as unprofessinal and unclear. – Nils Sep 03 '16 at 13:51
  • @Nils inbound of my server ! , i am trying download files with wget , aria2c , ftp and others ! , but source ip sent to the server i am trying to download is "44.44.44.2" – user3325376 Sep 03 '16 at 14:36
  • So you are talking about outbound connections? IOW, you connect to `example.org` and they see your secondary address instead of the primary? – Sven Sep 03 '16 at 14:42
  • @Sven yes ,exactly what i need – user3325376 Sep 03 '16 at 15:13

1 Answers1

1

You don't say how your interfaces are configured so all I'll do here is point you at the relevant documentation and advise that you try to reconfigure the IP addresses assigned to each interface.

If that doesn't work, or you're not able to make the changes then you will have to move to the application level to attempt this. Once again the documentation is your friend. For example the wget manual has this relevant information

--bind-address=ADDRESS
When making client TCP/IP connections, bind to ADDRESS on the local machine. ADDRESS may be specified as a hostname or IP address. This option can be useful if your machine is bound to multiple IPs.

Other application are left as an excercise for the reader.


Original non mind reading answer:
Inbound connections are normally made after referencing the DNS to obtain the IP address to make the inbound connection to. If connections are being made to the wrong IP address you will need to update the DNS appropriately.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • it's not about dns / wget , ftp ,... sending connection with "44.44.44.2" my second ip address – user3325376 Sep 03 '16 at 14:37
  • The [question I answered](https://serverfault.com/revisions/800882/1) said `inbound` connections. If you asked the wrong question then what do you expect - mind reading ? – user9517 Sep 03 '16 at 15:31