LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 09-19-2003, 07:50 PM   #1
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Rep: Reputation: 30
RH9 as a router....


hi,

if i want to setup my RH9 as a router, then, where should i looking for? routing table?? $ route -n ??? or
iptables?? $ iptable -t nat ???

thanks..
 
Old 09-19-2003, 07:55 PM   #2
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
to setup a router you dont need iptables, you can play with the routing table and turn on ipforwarding and add the iptables nat rule if your router will double as an internet gateway.

rather than type it all out again, i'll suggest doing a search on the forums for this very topic. you'll find a few good examples.

because you seem to want to use it as an internet gateway, make sure you pick something that does involve iptalbes because you'll want the security features too.
 
Old 09-19-2003, 09:24 PM   #3
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Original Poster
Rep: Reputation: 30
i am still blur.... can u pls explain in a more simple way?
anyway, i have been trying to setup a routing rules in my routing table... but, then, after i restart my networking services... the rules is changed... why? i am wondering.....

i did some studying on iptables too... there is a way for routing to a destination....in the PREROUTING chain.

ar..... i am too confused.... how??? what is the tool??? routing table or iptables -t nat ???

pls, give me more explaination.... what is the differences between routing table and iptables -t nat???
how can i make use to both of them??? thanks.... it is really urgent.... bye.....
 
Old 09-20-2003, 11:23 AM   #4
darkseed2g3
Member
 
Registered: Sep 2003
Location: Philadelphia ,Pa
Distribution: Fedora Core 1 BABY !!! YEA
Posts: 67

Rep: Reputation: 19
i have a gateway system that is a redhat 8.0 box but all the same rules apply to you to

basicly the command follws as is

iptables -t nat -A POSTROUTING -o eth0( in my case) -j MASQUERADE

the -o flag is for interface out meaning the object that you connect to the internet with wether it be
ppp0
eth0
what ever

the you enter this command

echo 1 > /proc/sys/net/ipv4/ip_forward

that right there enables ip forwadding , now the only bad part of this is , you know have this gateway/router with a weak firewall installed so you might wanna beef up security by inserting some chains into iptables
me i have
iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
thats a simple way to allow you to ping another computer but anytime someone pings you , it drops them like a bad habbit.
And another good program out there for your firewall , gateway would be portsentry. So simple to install , what it does when someone does a portscan/nmap it gives them bogus info and drops them from the routing tables in ipchains . So even if they wanted to they couldnt connect to you , but beware because your deny list gets kinda of big specially if you have broadband.
 
Old 09-20-2003, 01:38 PM   #5
seabass55
Member
 
Registered: Jan 2003
Location: 127.0.0.1
Distribution: Fedora&Gentoo
Posts: 207

Rep: Reputation: 30
http://www.linuxquestions.org/questi...threadid=93577
 
  


Reply



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
how to setup RH9 to Linksys router to dsl? dfawvor Linux - Networking 6 03-03-2004 01:13 PM
NAT / Router RH9 kdd281 Linux - Networking 3 11-24-2003 02:02 PM
Zoom X4 ADSL Modem/Router and RH9 mantas Linux - Hardware 0 09-23-2003 12:43 PM
RH9 as router straw Linux - Networking 6 08-28-2003 03:50 PM
Router - XP, Server RH9 m_simin Linux - Software 6 08-23-2003 12:24 PM

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

All times are GMT -5. The time now is 03:15 AM.

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