Jump to content

Internet sharing via NFS [solved]


Guest BenganG
 Share

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
Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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:

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...