If you are using a desktop version of Ubuntu, with a graphical network-manager tool installed, then you should not define the connection in the /etc/network/interfaces file.
Instead, open the connection via the nm-applet on the desktop (or by invoking nm-connection-editor
from a terminal), navigate to the IPv4 settings tab, and set the connection mode to Manual using the drop-down selection box. Then add your desired IP and DNS settings in the boxes provided.
You should then revert any edits to your /etc/network/interfaces file (so that it contains only the lo
definition lines) and either restart both the networking
and network-manager
services or reboot the machine.
You should also make sure that the chosen static IP address is outside the DHCP pool assigned by your router - in fact, you may find it simpler to keep a DHCP configuration on the machine, and reserve a particular IP for it on the router, if it supports DHCP address reservation.
If you really want to keep the GUI network-manager
, but define your interface via /etc/network/interfaces, then you could try editing /etc/NetworkManager/NetworkManager.conf, changing
[ifupdown]
managed=false
to
[ifupdown]
managed=true
and then making sure there are no other competing connections defined in the /etc/NetworkManager/system-connections/ directory (where 'competing' means 'using the same interface as'). This should allow you to see and control the connections in /etc/network/interfaces under the GUI network-manager applet.
Alternatively you could remove the network-manager package altogether.
Best Answer
If you have been hacked, or even think you have been hacked, then there is no easy way to determine what all has been done to your system.
In your case, we know that, at the very least, your system's hostname has been changed. However, a backdoor for the hacker could have been installed. Malware could have been installed. Your system could be configured to use poisoned DNS. You could have malware that's downloading very very NSFW illegal things to your computer. There is literally an unending list of things your computer could be doing as a result of being hacked..
Your best solution is to "Nuke It From Orbit"TM, or in laymans terms, "Completely reinstall from scratch".
In addition to reinstalling your system from scratch, take the following steps: