Difference between revisions of "Network FAQ"


From Knoppix Documentation Wiki
Jump to: navigation, search
(Network config and permanence)
Line 27: Line 27:
 
==== Q: How do I use a static IP address with the CD-Rom? How do I modify /etc/hosts and /etc/resolv.conf which are read only files?  AFAIK, this is necessary to specify my IP address and my (ISP's) nameservers. ====
 
==== Q: How do I use a static IP address with the CD-Rom? How do I modify /etc/hosts and /etc/resolv.conf which are read only files?  AFAIK, this is necessary to specify my IP address and my (ISP's) nameservers. ====
  
A1: For v3.2, K-menu > KNOPPIX > Network/Internet > Network card configuration -- same as "sudo netcardconfig" command. Fast, easy, automated script: decline DHCP, enter IP address, accept other default settings (modify if needed). Done.
+
===== A: GUI driven configuration
 +
The read only files are copied into a ram disc upon start up, hence they are easy to edit when root. Several tools are made available for easy configuration. For v3.2-v3.9:
 +
  K-menu > KNOPPIX > Network/Internet > Network card configuration
 +
which is the same same as performing the
 +
  sudo netcardconfig
 +
command from a shell. Fast, easy, automated script:
 +
* decline DHCP
 +
* enter IP address
 +
* accept or edit other default settings
 +
* Start firewall
  
A2: ''(rhk) Ahha! (I think) -- the key to this question is to recognize that even though /etc/hosts and /etc/resolv.conf are read only files on the CD, when Knoppix is running another copy of these files is kept somewhere else (a RAM disk??) where they can be modified.  So, it is fairly easy to set up a static IP and so forth for a given Knoppix "session", the trick is saving those settings between Knoppix boots.  There is an FAQ on using something like knoppix.sh or a persistent home directory -- those might be the clues I need to save the settings after a reboot.''
+
===== A: Manual configuration
 
+
Start a "root shell" (available from the K-menu) to edit the read-only files.
+
 
+
'The following is provided in the interest of developing a complete answer for the next person who has the question.'
+
 
+
'Aside: I'm guessing that I can incorporate these commands in a file named knoppix.sh on a floppy disk.  Then per the cheat code sheet, I should be able to issue "knoppix floppyconfig" during the boot process.'
+
 
+
What I've done so far (in this example, my local IP address is 192.168.0.25, and my gateway is 192.168.0.10):
+
*"ifconfig eth0 192.168.0.25 netmask 255.255.255.0 up"
+
*"route" to check the routing table
+
*"route add 192.168.0.25 eth0"
+
*"route add -net 192.168.0.0 netmask 255.255.255.0 eth0"
+
*"route add default gw 192.168.0.10 eth0"
+
*"route add -host 127.0.0.1 lo"
+
 
+
Other notes:
+
*One of the lines above creates a redundant entry in the routing table
+
**forget which one offhand
+
**will correct the above next time I try it.
+
 
+
TIP: probably the "route add 192.168.0.25 eth0" is not needed,
+
since the line "route add -net 192.168.0.0 netmask 255.255.255.0 eth0"
+
will include your own IP.
+
 
+
---------
+
 
+
A3: Here's what I did:
+
 
+
*start root shell
+
*edit /etc/resolv.conf, input my name servers
+
*ifconfig eth0 192.168.1.3 up
+
*route add default gw 192.168.1.1
+
 
+
That's it!
+
 
+
A4: (smoe) Hm. Everybody is talking about a scripthere
+
 
* start root shell
 
* start root shell
 
* Specification of nameservers, these should work for anyone as a first hack
 
* Specification of nameservers, these should work for anyone as a first hack
Line 76: Line 49:
 
   auto lo eth0
 
   auto lo eth0
 
   iface lo inet loopback
 
   iface lo inet loopback
 
 
   iface eth0 inet static
 
   iface eth0 inet static
 
     address /your IP number goes here/
 
     address /your IP number goes here/
Line 84: Line 56:
 
* Get things going, lo is going already
 
* Get things going, lo is going already
 
   ifup eth0
 
   ifup eth0
 +
* Start the fire wall with K-MENU -> KNOPPIX -> Services -> Firewall (someone please give the exact english spellings here)
  
Somebody please give a proper pointer to the knoppix.sh or whatever cheatcode script this is. I hoped there would be something like an automated diff between the CD and what the ramdisc has for us that would be same as automagically be transfered to something we can then boot with or so. I'll continue reading.
+
In order to make this persistent with the next reboot, one should create a persistent image o the local changes, suggested is to use a USB stick for such. See K-MENU -> KNOPPIX -> Configuration -> Install permanent image + Save configuration. No data on the USB stick will be overwritten.
  
 
----
 
----
 
Return to [[Knoppix FAQ]]
 
Return to [[Knoppix FAQ]]

Revision as of 11:56, 5 August 2005

-German Version: Network FAQ Deutsch

-Versión en español: Network FAQ Spanish


Return to Knoppix FAQ


Q: How do I get ADSL with PPTP in austria to work?

A: the following instruction should work: http://howto.htlw16.ac.at/at-highspeed-howto-2.html (German)

Q: How do I configure SAMBA or how can i use windows shares?

A: See Smb Client HowTo for connecting to windows shares. See Samba Quick FAQ for setting up a Samba server

Q: I have installed to my Hard Drive and how do I connect to internet using DHCP?

A: The harddisk-installed system is a "normal" Debian. You have to add the following lines to /etc/network/interfaces :

  • auto eth0
  • iface eth0 inet dhcp

re-start the network with /etc/init.d/networking restart to have the changes take effect.



Q: How do I browse through my Windows network at the office ? Can I log in at an NT domain ?

A: K-menu > Internet > Lin Neighborhood. Go to its preferences and specify IP for master server or WINS server. See also Samba info above.


Q: How do I use a static IP address with the CD-Rom? How do I modify /etc/hosts and /etc/resolv.conf which are read only files? AFAIK, this is necessary to specify my IP address and my (ISP's) nameservers.

===== A: GUI driven configuration The read only files are copied into a ram disc upon start up, hence they are easy to edit when root. Several tools are made available for easy configuration. For v3.2-v3.9:

 K-menu > KNOPPIX > Network/Internet > Network card configuration

which is the same same as performing the

 sudo netcardconfig

command from a shell. Fast, easy, automated script:

  • decline DHCP
  • enter IP address
  • accept or edit other default settings
  • Start firewall

===== A: Manual configuration

  • start root shell
  • Specification of nameservers, these should work for anyone as a first hack
 cat >> /etc/resolv.conf <<EORESOLV
 nameserver 139.30.8.7
 nameserver 139.30.8.8
 <<EORESOLV
  • Overwrite original network description
 cat > /etc/network/interfaces <<EOINTERFACES
 auto lo eth0
 iface lo inet loopback
 iface eth0 inet static
   address /your IP number goes here/
   netmask 255.255.255.0
   gateway /and your gateway's address/
 <<EOINTERFACES
  • Get things going, lo is going already
 ifup eth0
  • Start the fire wall with K-MENU -> KNOPPIX -> Services -> Firewall (someone please give the exact english spellings here)

In order to make this persistent with the next reboot, one should create a persistent image o the local changes, suggested is to use a USB stick for such. See K-MENU -> KNOPPIX -> Configuration -> Install permanent image + Save configuration. No data on the USB stick will be overwritten.


Return to Knoppix FAQ