View Full Version : editing network settings problem
AdykOSu
22nd December 2005, 14:31
i used nano /etc/network/interfaces to write my network setting ( just like in the PERFECT SETUP DEBIAN 3.1 SARGE HOW TO ) and now i want to return to the command promt and start configuring.but the main "problem" is that i don't know how to exit the nano editor. please help! p.s.: kinda embarising :(
thx in advance!
till
22nd December 2005, 14:45
press [ctrl] + x and then press y to safe the file.
AdykOSu
22nd December 2005, 17:22
press [ctrl] + x and then press y to safe the file.
I did that..but there is another problem. the following message appears :
Could not open file for writing: Permission Denied
How can i make that file's permission writable?
Also when it asks me the name of the file to be saved ( in this case /etc/network/interfaces can i give it another name ( for example "eth0conf" and if so, how can i make that file to be seen as the default config file for my network ?
thx in advance!
falko
22nd December 2005, 17:28
I did that..but there is another problem. the following message appears :
Could not open file for writing: Permission Denied
How can i make that file's permission writable?
You have to be root to edit that file!
Also when it asks me the name of the file to be saved ( in this case /etc/network/interfaces can i give it another name ( for example "eth0conf" and if so, how can i make that file to be seen as the default config file for my network ?
It makes no sense to rename that file to eth0conf, because that files contains also the configuration for other network interfaces like eth1, for example. So don't change the name.
AdykOSu
22nd December 2005, 17:47
it works! :D thx for the quick replies falko & till!
now..after everything's configured... how do i verify the settings ?
I want everything to be done before i can start installing & configuring a FTP server!
thx in advance!
till
22nd December 2005, 17:49
All steps in howto configuration has been done as root user!
After you restarted your network you can verify the settings with the command "ifconfig".
AdykOSu
22nd December 2005, 18:33
i did that! is shows me the settings i did input! thx again!
but i see in the HOW TO that a second IP is given to the same ethernet adapter, as shown here
If you want to add the IP address 192.168.0.101 to the interface eth0 you should change the file to look like this:# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
auto eth0:0
iface eth0:0 inet static
address 192.168.0.101
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
i don't fully understand why!
and by the way.. i see network 192.168.0.0
broadcast 192.168.0.255 in the configuration. does that mean the range of ips that can be applied to my network?
falko
22nd December 2005, 18:55
http://www.howtoforge.com/forums/showthread.php?t=130&page=2
http://www.howtoforge.com/forums/showthread.php?t=611
AdykOSu
22nd December 2005, 20:29
i tried now to change my network settings ( gateway ) using nano /etc/network/interfaces . did so, saved file and tried to restart the network using /etc/init.d/networking restart and it replies back with the following message : Setting up IP spoofing protection: rp_filter
Reconfiguring network interfaces... ifup: interface already configured
SIOCADDRT: Network is unreachable
Failed to bring up eth0.
done
till
22nd December 2005, 20:35
please post the content of /etc/network/interfaces
AdykOSu
22nd December 2005, 20:53
please post the content of /etc/network/interfaces
this is the exact content of "/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 static
address 192.168.4.85
netmask 255.255.254.0
network 192.168.4.0
boradcast 192.168.4.255
gateway 192.168.182.2
falko
22nd December 2005, 22:51
this is the exact content of "/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 static
address 192.168.4.85
netmask 255.255.254.0
network 192.168.4.0
broadcast 192.168.4.255
gateway 192.168.182.2
Your network settings are wrong.
Is 192.168.182.2 really your gateway? Then you should pick an IP address from the 192.168.182 net for eth0. Also, the netmask should be 255.255.255.0. Of course, if you switch to a 192.168.182 IP address, you also have to adjust network and broadcast appropriately, like this:
#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 static
address 192.168.182.85
netmask 255.255.255.0
network 192.168.182.0
broadcast 192.168.182.255
gateway 192.168.182.2
AdykOSu
22nd December 2005, 23:09
i did set up the gateway this way:
iface eth0 inet static
address 192.168.4.85
netmask 255.255.254.0
network 192.168.4.0
broadcast 192.168.4.255
gateway 192.168.5.254
and i receive the following message when i restart my network using/etc/init.d/networking restart : Setting up IP spoofing protection: rp_filter.
Reconfiguring network interfaces...ifup: interface lo already configured
don....so i think that's ok. isn't it? :D
falko
22nd December 2005, 23:23
i did set up the gateway this way:
iface eth0 inet static
address 192.168.4.85
netmask 255.255.254.0
network 192.168.4.0
broadcast 192.168.4.255
gateway 192.168.5.254
That's still wrong! The gateway has to in the same subnet as eth0, e.g. 192.168.4.254 (and it really has to be a gateway, you cannot make up any IP address you can think of, because then you won't have internet access).
And your netmask is still wrong. It has to be 255.255.255.0, not 255.255.254.0!
and i receive the following message when i restart my network using/etc/init.d/networking restart : Setting up IP spoofing protection: rp_filter.
Reconfiguring network interfaces...ifup: interface lo already configured
don....so i think that's ok. isn't it? :D
That's not that serious.
AdykOSu
23rd December 2005, 00:02
Here is my current config ( on my Win OS ) : IP address : 192.168.5.xx
Subnet Mask : 255.255.254.0
Default Gateway : 192.168.5.254
DHCP Server : 81.168.168.129
DNS Server : 192.168.5.254
WINS Server : taken from my Network Connection Details in Win.. i run Linux using VmWare workstation 5.5 and the host OS is Win XP SP2.
should i try to config the same way the interfaces ( eth0 ) on my Debian?
falko
23rd December 2005, 10:05
Have a look at http://www.subnetmask.info/ to calculate your correct settings.
If you use the IP address 192.168.5.253, for example (with the gateway 192.168.5.254), then network must be 192.168.4.0, and broadcast must be 192.168.5.255.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.