LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2018, 10:10 PM   #1
Efron
LQ Newbie
 
Registered: Apr 2018
Posts: 1

Rep: Reputation: Disabled
Unhappy Does not have internet access after changing ip address


I have change my IP address by using this method...

ifconfig eth0 192.168.0.10 netmask 255.255.255.0 up (which is the IP address that I want)

route add default gw 192.168.1.1

echo "nameserver 1.1.1.1"> /etc/resolv.conf

I successfully changed my IP address but after changing i cannot connect to my internet and i'm not very sure about the method that i suing above.

Please advise. Thanks.
 
Old 04-22-2018, 10:24 PM   #2
TsVk!
LQ Newbie
 
Registered: Jul 2016
Location: Australia
Distribution: Debian
Posts: 19

Rep: Reputation: Disabled
route add does not set permanent routes

set your routes and IP by editing /etc/network/interfaces

Last edited by TsVk!; 04-22-2018 at 10:25 PM.
 
Old 04-22-2018, 10:27 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,332
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
Check your router configuration. You may have changed your ip address to one that is inconsistent with the address that your router supports as the address of your local LAN.

If your router is supporting 192.168.x.xxx and your computer's ip address it 192.168.y.xxx, you will not be able to access the big wide world.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! server not found. only access to internet is IP address not web addres Urskie Linux - Newbie 14 10-07-2012 04:02 PM
Cannot Connect to Internet after changing MAC address blurboy Linux - Networking 5 10-01-2009 09:46 AM
If configuring a Fixed IP Address cannot access internet, what I have forgotten to do sheepy Linux - Networking 5 05-05-2009 09:37 AM
by using iptables block mac address to restric user to access internet Farrukh Fida Linux - Networking 3 10-09-2006 07:59 AM
Can't Access Internet after changing MAC digimafia Slackware 13 10-19-2005 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration