LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices



Reply
 
Search this Thread
Old 05-06-2007, 07:57 AM   #1
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
quick and easy way to get internet connection sharing


A new la entry has been added:

quick and easy way to get internet connection sharing

Quote:
This was only tested with Slackware, but should work on almost every other distribution and even for Windows.

Assume this is your setup:
A --> B --> Internet

You want to connect A to the internet, B is already connected.

Run this Code:
if [ -f /proc/sys/net/ipv4/ip_forward ]; then echo "Activating IPv4 packet forwarding." echo 1 > /proc/sys/net/ipv4/ip_forward fi iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

on B as root and this
Code:
route add default gw $(ipadresse of B)

on A.

Done. Isn't it great?
 
Old 12-05-2009, 10:49 PM   #2
teluguswan
Member
 
Registered: Oct 2005
Posts: 116

Rep: Reputation: 15
Lightbulb

Very nice easy and shortcut

why dont you provide the example


by placing the values of A, B and ipaddress


that will be more helpfull to understand
 
  


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
Internet Connection Sharing Xelopheris Linux - Networking 1 02-28-2005 01:08 PM
Internet Connection Sharing siralek88 Linux - Networking 3 01-07-2005 07:11 PM
internet connection sharing crossconnects Linux - Networking 1 09-24-2004 05:49 PM
Internet Connection Sharing SpeedKing Linux - Networking 10 06-27-2004 10:46 AM
Sharing internet connection KRunch Linux - Software 1 02-22-2004 05:46 AM


All times are GMT -5. The time now is 03:13 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration