LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-21-2004, 09:29 PM   #1
anorman
Member
 
Registered: Aug 2003
Posts: 43

Rep: Reputation: 15
internet conection sharing with cable modem


I have been unable to find a suitable howto concerning the setup of internet sharing with my setup. I have two Network cards in my comp, both working, and assigned ip's. The first is connected to my cable modem, receiving an ip from the provider dynamically. The second I have configured to 192.168.2.1. This second Nic is connected to a switch, which my other windows comp is connected to. I set up dhcp, and that appears to work, as it assigns the windows comp an ip (however it does not appear to assign a gateway). I know that I have to do some ip masquerading, but does anyone have the time to talk me through this?

Thanks,
-Norman
 
Old 07-21-2004, 11:49 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi anorman,
Congratulations! You are already in the middle of the journey. To configure gateway and dnsservers you have to change you dhcpd.conf, including or editing this three lines in the global configuration:
Code:
option routers                192.168.2.1;
option domain-name-servers    xx.xx.xx.xx;
option domain-name            "your-domain";
Ok, on the xx.xx.xx.xx you may use the dns servers provided by your ISP and, in this case, your domain will also be the domain of your ISP. However, when your internet connection is down, any station will slow to death when trying to resolve a new address. So, I suggest you install a local dns server. The official and default dns server for *nix and linux is bind. But it is difficult to configure and is not tailored for a connection like ours. It is conceived for a computer always connected and with fixed IP. So i recommend you install dnsmasq, which you can get at freshmeat. It has an easy configuration file and it stays alert to changes in environment like connection restart and turn on/off of your stations by looking to the leases of your dhcp server. In this case, you have to give in dhcpd.conf your machine as dns server and any name you like as your domain. Don't use the standard names such as .com, .net, etc. but, for example, .nor, .ano, .nrm. This server will resolve the addresses into your home network and, when it could not resolve, it will forward it to you ISP.
Now, we need to configure your server to forward the messages in and out your network. You have to configure a firewall to route the messages and masquerade you home ips. More than this we need to block the attacks you are constantly suffering. For this I suggest you visit www.netfilter.org, with is the home of iptables, the framework developed to firewalling linux. There you will find deep information about this subject as well as scripts ready to do your job.
 
  


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
Is a adsl backup to a cable modem conection posible? Anubis Linux - Networking 4 09-01-2003 12:57 PM
Internet Conection Sharing soulsniper Linux - Networking 6 07-12-2003 09:59 AM
Toshiba Cable Modem-Internet Sharing greenarrow Linux - Hardware 4 06-26-2003 07:53 PM
RH9 Internet Sharing USB Cable Modem Ju Deddo Koinu Linux - Networking 5 05-01-2003 03:44 AM
Internet conection sharing sqn Linux - Networking 1 03-18-2003 04:54 PM

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

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