my girlfriend has the ip address to my computer and is getting onto my computer and stealing stuff. i use linux and was wondering if i could assign a new ip address other than thru my internet provider, which i will do if there is no other way.

i looked up online and found the following article: http://www.wikihow.com/Assign-an-IP-Address-on-a-Linux-Computer

Is it possible to assign a new REAL IP ADDRESS, not just masking my real ip address which wouldn't be of any use.


  • It is no problem to change the ip-address but in this case I suspect you mean the external ip on the internet. You could change that but your provider wil probably not accept your self-chosen ip. Would become a bit messy out there if everyone just starts jumping ip :)
    – Requist
    Dec 28 '13 at 23:34
  • You have a static IP through your ISP? Easiest solution would be to put a router or firewall between your modem and computer and only open the necessary incoming ports you need.
    – douggro
    Dec 28 '13 at 23:47
  • I've often found that leaving the router off for a few days leads to a new external IP. How is your girlfriend getting in anyway? Surely you should be looking to plug that hole rather than just change IP (it's like you planning to move house because she knows your address, and is stealing from you, instead of just getting a bigger bolt on your door, which would stop her and everyone else stealing from you...)
    – fpghost
    Dec 29 '13 at 0:28
  • thanks. this is the deal. i'm using the library and someone is directly connecting to my computer b/c they know the ip of the library; trust me, that is how they are connecting to my computer. I could tell you why but i'll forego that for now.
    – user229656
    Dec 29 '13 at 1:12
  • thanks. this is the deal. i'm using my laptop/ library and someone is directly connecting to my computer b/c they know the lib's ip; trust me, that is how they are connecting to my computer. There are 2 options: secure my computer, though they are experts at getting through the most secure comp systems and quickly! i would rather change the ip address for my comp (i'm guessing internal). this way if they connect to the lib sys they wouldn't get on my comp. THen again, changing the internal wouldn't affect the lib ip i'm guessing. i've had ubuntu firewall on but doesn't seem to prevent x.thx
    – user229656
    Dec 29 '13 at 1:19

Turn router off overnight, hope lease expires, get new IP (it may take longer than this).

Alternatively change MAC address of router, either via cloning/spoofing (if router supports this..see the manufacturer webpage), or just request a new router from ISP (or buy new router).


You have two options. However, since you need to change the IP address to static, the only way is to set-up a manual/static IP editing the /etc/network/interfaces file. for that you need to edit the interfaces file with;

sudo nano /etc/network/intarfaces

You'll ideally see something like;

auto eth0
iface eth0 inet dhcp

Replace it with;

auto eth0
iface eth0 inet static
address x.x.x.x
netmask x.x.x.x
gateway x.x.x.x

Moving further, if you have or require domain to be resolved along with DNS servers, you may add few more lines to the file, similar to;

auto eth0
iface eth0 inet static
address x.x.x.x
netmask x.x.x.x
gateway x.x.x.x
dns-search example.com
dns-nameservers x.x.x.x x.x.x.x

Please note, there are two sets of x.x.x.x within the DNS name servers (Primary and Secondary) with a space. You may use one pair or both depending on your requirement.

To save the file select ctrl+o, -> enter and exit with ctrl+x.

And then just to be sure, simple restart the interface with;

 sudo ifdown eth0           # wait for sometime
    sudo ifup eth0             # and then issue this to restart

Also, as a final step, simply type below to confirm the interface change;

ifconfig -a

Alternative way;

Refer to your server or the device which responds to DHCP requests and add a reservation, in case if you do not like to play with the server, files.. etc.

In order to get the MAC address for reservation, simply check the interface information with a;

ifconfig eth0                 # or type ifconfig -a

which should ideally display something similar to below;

ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:15:c5:4a:16:5a  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::215:c5ff:fe4a:165a/64 Scope:Link
          RX packets:466475604 errors:0 dropped:0 overruns:0 frame:0
          TX packets:403172654 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2574778386 (2.5 GB)  TX bytes:1618367329 (1.6 GB)

Where you see the HWaddr 00:15:c5:4a:16:5a and assign it to the DHCP reservation.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.