LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-09-2005, 09:01 PM   #1
akhenaton22
LQ Newbie
 
Registered: May 2005
Posts: 1

Rep: Reputation: 0
Sharing connection question...


Well to make a long story short, I attend a University where they think it is necessary to have only one computer on the network, and have a log-in everytime you boot your computer to get access to the internet (dumb I know but they arent willing to change it). So I've decided to make them unhappy by using linux instead of windows b/c they hate it. Right now I have windows and I share my connection to another network card so that I can have more then one computer on the network. this ethernet cable is connected to a router, with wireless for my laptop and a hard connection for my other computer. Is there a type of sharing a connection in SUSE linux. Sorry, but I am a newb to linux.

Thanks
akhenaton22
 
Old 05-10-2005, 02:26 PM   #2
systemparadox
Member
 
Registered: Jul 2004
Location: Tavistock, Devon, England
Distribution: Slackware 9.1, Mandrake 9.0/9.1/10.0, LFS 6.0, Knoppix 3.1/3.3
Posts: 73

Rep: Reputation: 15
Quote:
Well to make a long story short, I attend a University where they think it is necessary to have only one computer on the network, and have a log-in everytime you boot your computer to get access to the internet (dumb I know but they arent willing to change it). So I've decided to make them unhappy by using linux instead of windows b/c they hate it.
Nice one

Sorry, but I don't quite get your network setup. You have three computers? You have a windows machine connected directly to the uni network with one nic and to the router with the other? Then another computer connects to this router via ethernet and a laptop connects to it via wifi?

Maybe that doesn't matter though, because linux has the most amazing routing/connection sharing/firewall called iptables.
Just run the following commands, replacing "eth0" with the interface connected to the uni network:

#Enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -p all -o eth0 -j MASQUERADE

This will make the linux box change all packets going through it to the uni network and make them look like they come from the linux box itself. Then when any packets related to that connection come back, they are changed back and sent to the correct machine. You should set the default gateway for all other machines to the ip of the linux box.

If you run the above commands and check that it works- once it does i'll tell you how to add them to your startup scripts so you won't have to run them on every boot.

I am assuming here that you have no firewall of any sort running on the linux box. Let me know if you want a fullproof iptables firewall which will only let packets in that you ask for (no incoming connections, so computers on the uni network won't be able to access any shares or webservers or whatever that you might have).

Hope this is of some help
Simon
 
  


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
ad-hoc connection (and internet sharing) between two linux boxes. A complex question. riccisit Linux - Wireless Networking 1 09-29-2005 09:02 AM
Stupid question about internet connection sharing sickboylives Ubuntu 2 07-10-2005 04:58 PM
idea: sharing net connection, method: iptables..., problem: broken net connection :( danny2055 Linux - Networking 4 06-09-2003 07:00 AM
lan://localhost question and connection sharing steve423 Linux - Networking 4 12-27-2002 01:23 PM
connection sharing issue (not exactly a linux question) zovres Linux - Newbie 1 11-28-2002 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08: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