LinuxQuestions.org
Help answer threads with 0 replies.
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 01-29-2005, 04:24 PM   #1
lumba
Member
 
Registered: Dec 2004
Location: USA
Distribution: redhat9
Posts: 53

Rep: Reputation: 15
How to share internet in dual fedora box


I have a lan made of two Fedora Core that has host names "jinan" and "Zebra". There is one ethernet card eth0 installed in "jinan" and two cards, eth0 and eth1 in "Zebra". I am able to ping all host names and ips from any of them. Zebra has Xdsl connection to the internet via eth0 and connected to "jinan" via eth1. Zebra was configured to enable packet forwarding so i can access the internet from jinan. I changed "net.ipv4.ip_forward=1"in sysctl.conf. I also configured Zebra as nfs server to share a directory called linuxnetwork and made sure nfs is installed and running. I created a directory in jinan called Zebra_share to map to the shared directory linuxnetwork.
The problem is that i was not able to mount the directory Zebra_share. From Jinan i entered the command: mount Zebra:/home/user.../ linuxnetwork ./Zebra_share.
I get the message "mount to NFS server 'Zebra' failed: server is down". I don't know what more i need to configure for Zebra to be available as an NFS. Even after i get the failed nfs message, i am still able to ping and tracerout.
I was not able to access the internet from jinan via Zebra and i was never able to telnet any host from the other one.
You guys are very helpful and i appreciate that. I received help before from comprookie and i can use some more in this one.
 
Old 01-29-2005, 04:58 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Try these commands from both Fedora boxes:
chkconfig --level 5 nfs on
service nfs restart
 
Old 01-29-2005, 06:16 PM   #3
lumba
Member
 
Registered: Dec 2004
Location: USA
Distribution: redhat9
Posts: 53

Original Poster
Rep: Reputation: 15
it confirmed a list of oks including "starting nfs services and nfs mounted", but i still get the same error
"mount to NFS server 'Zebra' failed: server is down
 
Old 01-29-2005, 08:09 PM   #4
proxyghost
LQ Newbie
 
Registered: Jan 2005
Location: Bristol VA
Distribution: Fedora Core 3 / Slack 10
Posts: 13

Rep: Reputation: 0
What type of network cable are you using? Standard or Crossover cable.
If you are using standard pick up a Crossover cable and try that. A standard network cable will cause problems when connected between two computers directly.
 
Old 01-30-2005, 12:24 AM   #5
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
this is kind of two different issues (i hope i'm not confused about the names )
on Zebra run this script as root after you chmod 755 it
Code:
#!/bin/bash

echo "setting up IPmasquerading......"

IPTABLES='/sbin/iptables'

#All The lines below are NAT routing

# flush any old rules
$IPTABLES -F -t nat

# turn on NAT (IP masquerading for outgoing packets)
$IPTABLES -A POSTROUTING -t nat -o eth0 -j MASQUERADE

# enable IP forwarding (of incoming packets)
echo 1 > /proc/sys/net/ipv4/ip_forward
then you need to set jinan to see Zebra as "default gateway"

you netmask for your LAN might do this?
no doubt in your network setup there is a way to configure "Gateway"
i just don't know how to do it
but i do know how to do it i think with the "route" command
so try this on jinan - at least it's a hint or clue and if it works can go in a bootup script
route add Zebra-gw eth0
route add default gw Zebra-gw

you can look at your machines routing table with the "route" command by itself
see "man route"

--------
lets see for the NFS it's been a long time so info might be old !
if you have portmapper running
rpcinfo -p Zebra
should return a upd port listening called nfs
on Zebra rpc.mountd and rpc.nfsd should be running as well as
two kernel modules nfs and nfsd loaded
as well as having set up /etc/exports
 
Old 01-30-2005, 06:06 AM   #6
lumba
Member
 
Registered: Dec 2004
Location: USA
Distribution: redhat9
Posts: 53

Original Poster
Rep: Reputation: 15
foo_bar_foo has good info, but I just don't know how to make these changes. in FC3 i can add routes in File "/etc/sysconfig/network-scripts/route-eth#" or i can set ip forwarding in "/etc/sysctl.con" . when you say:
"on Zebra run this script as root after you chmod 755 it"
is this suppose to take me into a file? can you please tell me what file i should be in because when i enter !/bin/bash, i receive the message "-bash: !/bin/bash: event not found" . is there set-up from the cl.
i previously set ip-forwarding and now i set-up a default gw in jinan to 192.168.5.5 which is connected to the internet. i checked netstat in jinan and i confirmed that gateway 192.168.5.5 was added:
Destin Gateway Genmask Flg MSS window irtt Iface
0.0.0.0 192.168.5.5 0.0.0.0 UG 0 0 0 eth0

i am working on the part of accessing the internet from jinan via zebra. The setting so far did not do it. i appreciate more info from foo_bar_foo or other memebers.
 
Old 01-30-2005, 11:51 AM   #7
Adony
Member
 
Registered: Apr 2004
Location: Portugal
Distribution: Gentoo 2004.2 - working on LFS 6
Posts: 126

Rep: Reputation: 15
"on Zebra run this script as root after you chmod 755 it"
is this suppose to take me into a file? can you please tell me what file i should be in because when i enter !/bin/bash, i receive the message "-bash: !/bin/bash: event not found"

You can't type that directly on your terminal ...
You have to copy the script to a text file, save it, change its mod to executable (via chmod 755 file) and then run that file (maybe as root as you are using /sbin/ )...

Hope that helps
 
Old 01-31-2005, 07:02 AM   #8
lumba
Member
 
Registered: Dec 2004
Location: USA
Distribution: redhat9
Posts: 53

Original Poster
Rep: Reputation: 15
NFS is fixed. i am able to mount and access any file in Zebra from Jinan. thanks to you guys, i feel good and i start liking linux.
i am still unable to access the internet from jinan. while i am working on this problem, i would appreciate someone explainning the theory of accessing the lan client-server internet in terms of eth cards and loop-back ip address. i have the default gateway set in jinan to be zebra's address 192.168.5.4.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
xp-box to share internet connection with linux-box CrazyHorse Linux - Networking 7 09-29-2006 12:05 AM
Problem getting Internet on dual-NIC Slack 10.1 box Staedtler Slackware 21 07-11-2005 09:53 PM
Share Internet from Windows XP box?? general2000vn Linux - Networking 3 04-18-2005 07:58 PM
How to Share the internet connection from XP BOX to RH8? seow_ming Linux - Networking 7 12-18-2004 03:24 AM
share internet connection windows fedora woodshop Linux - Networking 1 07-27-2004 04:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration