LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2004, 03:26 AM   #1
stedo
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 22

Rep: Reputation: 15
Question Internet server woes!!


hi,

I am running RH9.0 and I have set up a small LAN between a desktop (server) and a laptop (client). The desktop has two cards eth0 and eth1. I have access to the internet using eth0 which is set up via dhcp and I have access to my LAN through eth1 which I have set to a static address. The machines talk to each other fine and I have set up file sharing, no problem!!...until...... I try to get my laptop access to the internet. I have given my laptop the IP address of my desktop as a gateway but I'm not getting any access through the laptop browser. I have forwarding switched on but still no luck. Can anyone help???

Thanks
Steve
 
Old 01-26-2004, 05:40 AM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
so you are saying you want to set up your desktop computer as a router.
have you installed the Redhat router packages ?

what configureations have you set ?

maybe u setip IP masquerading incorrectly ?
 
Old 01-26-2004, 06:13 AM   #3
stedo
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 22

Original Poster
Rep: Reputation: 15
hi,

I haven't done anything with routing, where do I find the routing packages and what are they called?? I haven't set up any masquerading either how do I check this??

Thanks
Steve
 
Old 01-26-2004, 07:57 AM   #4
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
i think there on either disk 2 or 3, cannot remember, use
redhat-config-packages as root.

basically, you need to configure iptables.

ive been speaking to some one else about this, aparently you dont ned the router packages, you can set it up manually.

become root, and post the output of the command
/sbin/iptables -L

iptables controlls all your network stuff like firewall rules and routing rules.
basically you need to add a rule that says if the network card recievs an ip packet thats addressed outside the local area network, ofrward that packet through to the modem.

its quite simple really, providing that your kernel has been configured and compiled to support IP MASQ, (which im 99% sure redhat is by default)
 
Old 01-26-2004, 08:02 AM   #5
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
oops, forgot to post your link...

http://www.yolinux.com/TUTORIALS/Lin...rkGateway.html
 
Old 01-26-2004, 08:25 AM   #6
stedo
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 22

Original Poster
Rep: Reputation: 15
hi,

Here's the result of the 'iptables -L':

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

thanks
Steve
 
Old 01-26-2004, 11:28 AM   #7
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
so you havnt actually told your pc to act as a router yet then.
follow the instructions at the link i posted, mainly....

Quote:
# Delete and flush. Default table is "filter". Others like "nat" must be explicitly stated.
iptables --flush - Flush all the rules in filter and nat tables
iptables --table nat --flush
iptables --delete-chain - Delete all chains that are not in default filter and nat table
iptables --table nat --delete-chain

# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward - Enables packet forwarding by kernel
you may neet to switch eth0 and eth1 depending on which is conected to lan, and which is connected to modem.

so, got it all sorted yet ?
 
Old 01-26-2004, 01:07 PM   #8
stedo
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 22

Original Poster
Rep: Reputation: 15
hi,

Think I have to read through a bit more about what those commands do but it worked!!! Thanks alot!

Cheers
Steve
 
  


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
nfs server woes, only getting 104kbps bobbens Debian 9 11-25-2005 06:08 PM
n00b internet woes caneman Linux - Newbie 1 01-16-2005 05:56 AM
shared internet woes - cant ping kola Linux - Networking 22 07-27-2004 06:30 AM
IPMasq, internet sharing woes (newbie) Eric the Red Linux - Networking 1 02-15-2004 08:04 PM
internet woes gonus Linux - Networking 2 06-10-2003 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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