LinuxQuestions.org
Register a domain and help support LQ
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 03-03-2004, 10:18 PM   #1
iel
LQ Newbie
 
Registered: Mar 2004
Posts: 7

Rep: Reputation: 0
Unhappy How to setup RH9.0 as firewall/router to share internet connection


Hi everybody,

Badly need your help, this is my first time to work on linux especially configuring a linux as a firewall and router to share my Internet connection to my private network. I already setup RH9.0 and configure the 2 NIC, eth0 to connected to my ISP and eth1 connected to private network. I test my connection both outside in inside network, using ping command and recieved a succesful reply. But i have no idea what to do next, obviously i'm newbie. Pls hep me to complete my server configuration on secured manner. thanks in advance.
 
Old 03-04-2004, 03:23 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
u need to learn "iptables"
u may also use "squid" cache proxy with "iptables". its called transparent proxy
u may find documents at www.netfilter.org

i will try to explain basicly how to share internet connection for your local network, but these will just share internet connection via NAT, visit www.netfilter.org to configure your firewall.
first enable routing beetween network devices.
edit "/etc/sysctl.conf" file and chance the following line
net.ipv4.ip_forward = 1

the following command enables NAT for local network (chance 192.168.0.0/24 to your real local network) eth0 must have a static public ip
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to ip_of_eth0

and save iptables config:
service iptables save
 
Old 03-04-2004, 03:23 AM   #3
chrisfirestar
Member
 
Registered: Sep 2003
Location: Adelaide, Australia
Distribution: Fedora/RH
Posts: 231

Rep: Reputation: 30
you will need to use iptables to set up the sharing.... I have done up a website to show you how to and it includes example scripts.

check out http://www.chrisliveonline.com/security/

Chris
 
Old 03-04-2004, 03:33 AM   #4
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
by the way your local clients will have trouble to connect ftp . u must enable passive ftp

u can add the following lines to startup file "/etc/rc.d/rc.local". so your linux will load ftp modules every startup:

modprobe ip_conntrack_ftp
modprobe ip_nat_ftp
 
  


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
router and firewall setup jibskg Linux - Networking 1 08-23-2004 10:01 AM
need to setup router to share and route dialup connection Insurr3cti0n Linux - Networking 2 11-18-2003 01:32 AM
RH9 internet connection setup jewe Linux - Newbie 2 11-08-2003 04:25 AM
RH9 internet connection setup jewe Linux - Networking 1 11-07-2003 08:49 PM
router/firewall setup please help?! basatum Mandriva 1 09-20-2003 04:53 PM


All times are GMT -5. The time now is 02:59 PM.

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