U
U
Urukhayy2015-05-21 07:03:21
System administration
Urukhayy, 2015-05-21 07:03:21

How are 2 IPs attached to one VPS?

How are 2 IPs attached to one VPS?
And if I want to put some program on one of the IPs, should I connect to the specified IP in SSH and that's it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
Li_ Ma, 2015-05-21
@almadob

And that's it.)

R
Roman Frank, 2015-05-21
@Akellacom

Urukhayy create a subdomain at the registrar and enter the IP address of your VPS. Create a host and that's it.

D
Dmitry Shinkar, 2015-05-21
@DeadCowsDontMoo

It is done in the settings of the server itself,
ip is configured on the node, and assigned to the desired VPS.
PS. I add: call the service provider =)

V
Vlad Zhivotnev, 2015-05-21
@inkvizitor68sl

All this is solved by routing.
The entire entry in the routing table looks like this:
8.8.8.8/32 via 192.168.0.1 dev eth0 src 192.168.0.2
where:
8.8.8.8/32 - where
192.168.0.1 - through which gateway
eth0 - through which network card
192.168.0.2 - outgoing ip
And there is a default route for all "other" traffic.
Accordingly, all _outgoing_ connections (not initiated from outside, by a request to the httpd server listening to the second address, for example) will go from the first address, except for those addresses to which you create separate routes with a different src.
There are methods to overcome this for individual applications, but I'm not sure that with such questions you will be able to implement these methods.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question