LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 11-25-2005, 07:44 AM   #1
Th3James
LQ Newbie
 
Registered: Jul 2005
Location: Sussex, England
Distribution: SUSE 9.3, Ubuntu Breezy
Posts: 14

Rep: Reputation: 0
suse router problem, laptop cannot access internet


Hi

I have posted about this problem in the past, and it was once working, but for some reason, without tweaking, a problem has arisen.
I'm at university, and i have my suse 9.3 box connected to the network in my halls. i want tom use this box as a router, to give my ubuntu laptop internet access. I followed this guide:
http://www.novell.com/coolsolutions/feature/16022.html
which did get the connection working, but then randomly, it stopped working.
when connected to the PC, the laptop recieves an IP via DHCP, and it can ping both the internal and external NICs on the PC. However, the laptop cannot access the internet through the PC. i tried entering the IPTables commands found in this:
http://www.linuxquestions.org/questi...ticle&artid=23
tutorial, and this fixed the problem once, temporarily, but now the problem is back
Im very puzzled!!!

thanks in advance
James
 
Old 11-25-2005, 04:29 PM   #2
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 30
Routing information only exists until you reboot. You need to put the iptables commands in a config file. If your distro doesn't have a specifiec rc file for this, then put them in /etc/rc.d/rc.local.
 
Old 11-27-2005, 05:32 AM   #3
Th3James
LQ Newbie
 
Registered: Jul 2005
Location: Sussex, England
Distribution: SUSE 9.3, Ubuntu Breezy
Posts: 14

Original Poster
Rep: Reputation: 0
ok, ive created a router config script, which ive placed into /etc/rc.d/ (although, im not certain this is the right directory)
anyway, even when i run this script, the laptop still cannot access the internet

here is the script im using

iptables -A INPUT -m state --state INVALID -j DROP
iptables -A FORWARD -m state --state INVALID -j DROP
iptables -A OUTPUT -m state --state INVALID -j DROP

iptables -A FORWARD -i eth1 -o eth0
iptables -A FORWARD -i eth0 -o eth1

iptables -P INPUT DROP
iptables -P FORWARD DROP

iptables -A INPUT -i eth1 -j ACCEPT
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

eth1 is the lan nic, and eth0 is the wan nic

the laptop cannot get a ping any furthur than eth0
 
  


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
Can't access internet thru router fpperryaz Linux - Wireless Networking 7 07-17-2005 09:38 AM
Cannot access Internet through SUSE 9.2 Pro router nexangelus Linux - Networking 3 02-08-2005 10:58 AM
Can't access internet through router!!! aXoneX Linux - Networking 21 12-22-2004 03:47 AM
can't access internet via router stormadvisor Linux - Networking 5 11-05-2004 06:36 PM
SuSE 9.1 Personal: Internet Access Problems using Zoom X4 Router johnerskine Linux - Newbie 1 06-29-2004 05:00 PM


All times are GMT -5. The time now is 12:01 AM.

Main Menu
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