LinuxQuestions.org
Help answer threads with 0 replies.
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 01-15-2005, 04:46 PM   #1
NeXuS_2006
Member
 
Registered: Dec 2003
Distribution: Fedora
Posts: 64

Rep: Reputation: 18
Setting up PC as router, eth1 problem talking to modem


Ok, heres the deal. I'v got Slack 9.1 installed (no Xwindows due to system's age), there are two NICs in (trying to setup the system as a router), and both seem to be working fine (not 100% sure), but the driver modules are loaded and running correctly anyhow. At this point I"m only worried about getting the PC to talk with my motorola cable modem, but it is having trouble getting an IP addy. I cannot ping my modem or any other system except loopback. In ifconfig, there is no IP ady for the ethernet card where it should be, it just says "UP BROADCAST NOTRAILERS RUNNING MULTICAST" Any help for me?

Last edited by NeXuS_2006; 01-15-2005 at 04:48 PM.
 
Old 01-15-2005, 09:40 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
Is eth1 the card that is connected to the modem,do you use dhcp or static?
Here is how I did it,works good.
http://www.gentoo.org/doc/en/home-router-howto.xml

Last edited by comprookie2000; 01-15-2005 at 09:44 PM.
 
Old 01-16-2005, 10:34 AM   #3
NeXuS_2006
Member
 
Registered: Dec 2003
Distribution: Fedora
Posts: 64

Original Poster
Rep: Reputation: 18
Yes, eth1 is connected to the modem, I am not worried about eth0 just yet, I just want this connected to the net first. We have a dynamic IP addy, in response to your question. Thanks for the link too, I'm reading it now, and it looks helpful.
 
Old 01-16-2005, 12:15 PM   #4
mangolicious
Member
 
Registered: Sep 2004
Location: Nowhere Special (if you don't get it, rent Blazing Saddles)
Distribution: Gentoo Linux
Posts: 63

Rep: Reputation: 15
try this:
this assumes eth0 is connected to lan and eth1 is connected to the modem. this also assumes it's not an external or internal dialup modem and that it's an adsl modem that uses PPPoE.
Code:
ifconfig eth0 192.168.1.1 netmask 255.255.255.0
ifconfig eth1 up
adsl-setup
*fill in stuff. don't hit "masquerading firewall" you will do that yourself.*
adsl-start
iptables -t nat -A postrouting -o ppp0 -j MASQUERADE
iptables -P INPUT DROP
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A INPUT -i ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp ! --tcp-option 2 -j REJECT --reject-with tcp-reset
if it's a dialup modem, then I have no clue...
 
Old 01-16-2005, 12:16 PM   #5
mangolicious
Member
 
Registered: Sep 2004
Location: Nowhere Special (if you don't get it, rent Blazing Saddles)
Distribution: Gentoo Linux
Posts: 63

Rep: Reputation: 15
oh wait a cable modem... hmmmm in that case, all I said with the ifconfig commands apply but the rest doesn't
 
Old 01-16-2005, 02:36 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,311

Rep: Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004Reputation: 4004
Have you tried configuring the network via
http://www.slackware.com/config/network.php
Configure eth1 for DHCP.
 
Old 01-17-2005, 01:23 PM   #7
NeXuS_2006
Member
 
Registered: Dec 2003
Distribution: Fedora
Posts: 64

Original Poster
Rep: Reputation: 18
Thanks for all the replies, this gives me a lot of things to try. I'll let you guys know how it goes.
 
  


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
<7>eth1: no IPv6 router present KLG Linux - Hardware 2 07-08-2005 08:01 AM
eth1 not talking the_cranky_don Linux - Networking 10 04-26-2005 07:49 AM
DHCP using eth1 for internet eht0 for router... Zero-0-Effect Linux - Networking 12 01-17-2004 04:06 PM
problem setting up router in linux http server mkepler1 Linux - Networking 1 12-18-2003 12:42 PM
software for dialing and talking thru modem qweqwe Linux - General 1 01-26-2002 09:57 PM

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

All times are GMT -5. The time now is 12:28 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
Open Source Consulting | Domain Registration