1

THe internet of where I live is controlled and filtered. I mean it does not let me connect to some servers using my real IP so I need to use a different IP address.Is it possible to change my IP manually?

4
  • 2
    Look for: Tor or VPN this is most likely what will help you out. Note you don't need a new address, you need to route through somebody else.
    – v010dya
    Sep 20, 2016 at 6:40
  • I think, you need a proxy: google.bg/…
    – pa4080
    Sep 20, 2016 at 6:40
  • 1
    Changing IP address is a wrong approach for this, proxies and VPN are the right tools.
    – Melebius
    Sep 20, 2016 at 6:51
  • there is a problem and that is the proxies themselves are filtered
    – arash
    Sep 20, 2016 at 14:03

1 Answer 1

1

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;

which should ideally display something similar to below;

ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:15:c5:4a:16:5a  
          inet addr:10.0.0.100  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::215:c5ff:fe4a:165a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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)
          Interrupt:16

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

Hope this helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .