LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   networking MDK 10.0 (https://www.linuxquestions.org/questions/mandriva-30/networking-mdk-10-0-a-317970/)

Trio3b 04-28-2005 02:36 AM

ssh changes resolv.conf
 
2 PCs both running MDK 10.0 connected via cat 5 crossover with 1 PC connected to internet via ext serial dialup modem. At this point I am NOT trying to get internet sharing working.
I have all the networking "bibles" in PDF format on my desktop including NFS and Samba.

I posted on several forums about 1 month ago that I just wanted to "see" the files on the other PC. I indicated that I would learn all the intricate stuff later, but for now, just something simple. I had been able to ping each PC. Well...........received bargeloads of information on CL stuff.....no luck, until someone said simply to type sftp://192.168.0.1 into Konqueror or terminal. Works, (am able to see konqueror files both ways), but here's problem.......

After doing so, I close konqueror (I'm done with "sharing files) then connect to net with Kppp, but my browsers don't work. My resolv.conf file gets messed with and have to do this to fix it:

gedit resolv.conf and delete any entries (I think sftp adds the other PC's address to the file)

remove the eth0 connection
then browsers are OK. Any ideas what is going on and how to fix?

PS: need to get a small network up and running
1. Does Mandrake have any decent documentation for using any of its GUI networking tools? I have poked around NFS and Samba but have no idea how to "invoke" them like I did the sftp
2. Does any one know if the MCC GUI tools work?
3. I guess the sftp thing is called ssh? Is NFS or Samba better?
4. What would best serve a small office network?

thanks for any help

iwpcs 04-28-2005 04:35 PM

Been hanging around this and other forums for a bit, and have come to the conclusion that the Mandrake GUI tools can cause problems if they do not work first time (perhaps the wrong choices have been made?).

So I wrote a couple of howtos to set up networking by editing the relevent files manually.

You will find them here:
http://www.iwpcs.co.uk/ics_modem.html
for the sharing host

http://www.iwpcs.co.uk/simple_net_setup.html
for any 'clients'

Quite a few people have had success using them, so give them a try and send me your feedback for improvements.

For the file sharing bit, NFS works very well for me. Use Samba if you have any Windows machines.

I know this is not exactly what you are asking, but you need to get the basic networking working reliably first...


Chris

Trio3b 04-29-2005 12:23 AM

These are the files in my /etc/sysconfig/network-scripts/
I don't see ifcfg-eth0 on PC1 (the one connected to net via dialup), but it is on PC2.

Also, most of these files are green and turquoise ( I guess links)

chat-ppp0 ifdown-ipv6* ifup.d/ ifup-routes* net_cnx_up*
ifcfg-* ifdown-post* ifup-ipv6* ifup-sit* network-functions
ifcfg-lo@ ifdown-ppp* ifup-ipx* ifup-sl* network-functions-ipv6
ifcfg-Manual choice* ifdown-sit* ifup-plip* ifup-wireless*
ifdown@ ifdown-sl* ifup-plusb* init.ipv6-global*
ifdown-aliases* ifup@ ifup-post* net_cnx_down*
ifdown.d/ ifup-aliases* ifup-ppp* net_cnx_pg*

Also this may help:
Here is resolv.conf BEFORE going online without LAN connection to PC2 being configured in MCC:

[name@192 etc]$ cat resolv.conf

AFTER going online:

nameserver 209.244.0.3 # ppp temp entry
nameserver 209.244.0.4 # ppp temp entry
nameserver 209.244.0.3 #kppp temp entry
nameserver 209.244.0.4 #kppp temp entry

OK.....here's resolv.conf after setting up new LAN connection in MCC:

[name@192 etc]$ cat resolv.conf
search 168.0.1
nameserver 192.168.0.2

here's after going on line:

[name@192 etc]$ cat resolv.conf
search 168.0.1
nameserver 192.168.0.2

# ppp temp entry
nameserver 209.244.0.3 # ppp temp entry
nameserver 209.244.0.4 # ppp temp entry
nameserver 209.244.0.3 #kppp temp entry
nameserver 209.244.0.4 #kppp temp entry

and now mozilla doesn't work.

I don't enter 168.0.1 in the MCC LAN setup wizard. I enter 192.168.0.1 for PC1.

PC1 is hooked to PC2 w/crossover and configured in MCC new LAN connection, and also hooked to internet via serial ext. modem configured thru Kppp. I did not setup the modem thru MCC new connection wizard.

PC2 is hooked to PC1 setup thru MCC new LAN connection.

I must be entering the wrong info into the wizard. I don't know what to enter in DCHP, DNS1,2,3, Zeroconf host, hostname, so I leave them blank. Maybe that's the problem.

Here is route command after deleting LAN connection on PC1. I don't want to setup LAN on PC1 again until I have access to another PC because I won't be able to post.

[root@192 user]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
nas1.city1.Le * 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default nas1.city1.Le 0.0.0.0 UG 0 0 0 ppp0

You are correct about the MDK MCC networking tools........they are not intuitive !!

Any help appreciated

iwpcs 04-29-2005 01:04 AM

Yep - another MCC mess...

All I can suggest is that you ignore the wizards and follow the howtos - there are not all that many files to edit.

You can create /etc/sysconfig/network-scripts/ifcfg-eth0 as root either with a text editor, or with
Code:

touch /etc/sysconfig/network-scripts/ifcfg-eth0
Mine is executeable, so I guess
Code:

chmod 755 /etc/sysconfig/network-scripts/ifcfg-eth0
See how you get on.

I think the search 168.0.1 thingy in resolv.conf is because your hostname is set as 192.168.0.1 - it thinks 192 is your hostname and 168.0.1 is your domain name... You should set the hostname as something like pc1.lan or whatever - see the howto.

When you are not online, you don't need anything in /etc/resolv.conf, but it doesn't hurt to have your ISPs nameserver in there. When online it gets set up automatically.

If you insist on trying the wizard, set DHCP to no or whatever the option is (this is covered in the howto by setting BOOTPROTO=static in ifcfg-eth0). Don't need zeroconf. DNS gets set up automatically, but you could enter 209.244.0.3 and 209.244.0.4

Good luck!
Chris


All times are GMT -5. The time now is 12:29 PM.