Setting up PC as router, eth1 problem talking to modem
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.
Location: Nowhere Special (if you don't get it, rent Blazing Saddles)
Distribution: Gentoo Linux
Posts: 63
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.