Проблема такая, что у меня VDS и когда я запускаю свою программу, то в ней мой внутренний ip машины определяется как внешний, то есть к примеру 92.22.22.22, а мне нужно чтобы internal ip был 192.168.1.3
Я пытаюсь это сделать с помощью изменения файла /etc/network/interfaces
и пишу в нем следующее :
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# The primary network interface
auto eth1
iface eth1 inet static
address 192.168.1.3
netmask 255.255.255.0
А по дефолту в нем было такое :
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
Дальше пишу в консоли команду /etc/init.d/networking restart и получаю это :
root@26354:~# /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... ssh stop/waiting
ssh start/running, process 4190
Cannot find device "eth1"
Failed to bring up eth1.
Дистрибутив : Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-58-generic x86_64)