Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here
Guest BenganG

Internet sharing via NFS [solved]

Recommended Posts

Guest BenganG

Hi

I have the following hardware configuration:

 

Mobile broadband <--> USB <--> PC ("Bengt") <--> eth0 <--> PC ("Shaobi")

 

The internal communication works fine - I can ping, see each other's files the way they are set up, see printers connected to Bengt from Shaobi, etc. Bengt can also communicate with the Internet (obviously). Shaobi is running Mandriva 2009.0 and Bengt is running Mandriva 2008.1.

 

I have tried to use MCC (and also manual configurations) to share the Internet connection with Shaobi, but that machine can not see anything on Internet., nor can it ping anything outside the local world. What have I done wrong? I assume there has to be some sort of setup on Shaobi to accept the Internet info, and I have been looking and looking everywhere for information without finding it. https://mandrivausers.org/style_emoticons/default/wall.gif

Any assistance would be much appreciated.

Edited by BenganG

Share this post


Link to post
Share on other sites

The machine that is dialing out is the "gateway"- and should be configured as such at all the clients.

All settings are done using the TCP/IP stack- no samba, nfs, or whatever here.

Share this post


Link to post
Share on other sites
Guest BenganG

Hmmm... Would you care to elaborate? I spent over a week to get this far, hehe. Are you suggesting I have to rip it all up again on the client and start all over? Good thing there is only one client! :D

 

Please bear in mind that I am a newbie to networking. I wouldn't mind step-by-step instructions.

Share this post


Link to post
Share on other sites

The IP address of the computer that connects to the internet, is the IP address you should use as the gateway address on the computer sharing the internet connection. On the machine sharing the internet connection MCC--> Network & Internet--> Network Center click Ethernet then click Configure. You will see the gateway section, enter the IP address of the machine that connects to the internet there. You may need to reboot the machine for the new settings to take effect.

Share this post


Link to post
Share on other sites
Guest BenganG

That setting was already done on both machines. Sorry. On Shaobi (see sketch in my first posting) I can attempt to ping, say, Google, and it gets the IP address of Google, but there is no response. If I try to ping the IP address of Google instead, I get the same result - no response.

Share this post


Link to post
Share on other sites
Guest BenganG

It's okay now! I found a script on http://www.linuxsolved.com/linux-forums/li...-to-t115.0.html that solved it for me. Here's the script:

 

# Defines the location of iptables executables.

iptables=/sbin/iptables

 

#Clears if any old iptable rules/ policies are there.

iptables --flush -t nat

 

# Now we will do Masquerading ie. we are doing NAT.

iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE

iptables --append FORWARD --in-interface eth0 -j ACCEPT

 

# Enabling packet forwarding.

echo 1 > /proc/sys/net/ipv4/ip_forward

 

Putting it in a file /etc/rc.d/rc.nat, making it executable and running it did the trick. I'm so excited! :lol2:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×