Networking Forums

Networking Forums > Computer Networking > Linux Networking > Linux Firewall / Routing Problem

Reply
Thread Tools Display Modes

Linux Firewall / Routing Problem

 
 
Idris Saliu
Guest
Posts: n/a

 
      02-13-2004, 04:00 PM
Hello All,
I'm trying to get a redhat 9 server to act as a router, caching dns
and firewall for my small office network, but i've had very little
success getting the system working right. i can do a dns lookup from
my internal network, but thats about it. i can't browse the web or ping
any servers outside my network. I have two nics with two static ip's,
with the following config

internet:eth0
ip 80.248.13.3
netmask 255.255.255.252
gw 80.248.13.1

Local Lan:eth1
eth1
ip 10.0.0.1
netmask 255.255.255.0

I have set net.ipv4.ip_forward = 1 in /etc/sysctl.conf

i also added the following command to my /etc/rc.d/rc.local script.

route add -net 80.248.13.3 netmask 255.255.255.252 dev eth0
route add -net 10.0.0.1 netmask 255.255.255.0 dev eth1
route add -net 0.0.0.0 netmask 0.0.0.0 gw 80.248.13.1


i think the problem might be with iptables, but I'm not sure what else
to do to get it working. I will really appreciate any information that
will enable me get this thing working. Thanks in advance
 
Reply With Quote
 
 
 
 
KH
Guest
Posts: n/a

 
      02-13-2004, 05:47 PM
Idris Saliu wrote:
> Hello All,
> I'm trying to get a redhat 9 server to act as a router, caching dns
> and firewall for my small office network, but i've had very little
> success getting the system working right. i can do a dns lookup from my
> internal network, but thats about it. i can't browse the web or ping any
> servers outside my network. I have two nics with two static ip's, with
> the following config
>


<snip>

>
> i think the problem might be with iptables, but I'm not sure what else
> to do to get it working. I will really appreciate any information that
> will enable me get this thing working. Thanks in advance


Check out the howtos on masquerading. This lets your router translate
the internal ip address to the routable internet one. Ethereal is your
friend for watching traffic to see if network packets are being sent and
received properly.
 
Reply With Quote
 
David Cutting
Guest
Posts: n/a

 
      02-14-2004, 05:13 PM
"Idris Saliu" <(E-Mail Removed)> wrote in message
news:2004021318004816807%saliui@qwestscientificcom ...
> Hello All,
> I'm trying to get a redhat 9 server to act as a router, caching dns
> and firewall for my small office network, but i've had very little
> success getting the system working right. i can do a dns lookup from
> my internal network, but thats about it. i can't browse the web or ping
> any servers outside my network. I have two nics with two static ip's,
> with the following config
>
> internet:eth0
> ip 80.248.13.3
> netmask 255.255.255.252
> gw 80.248.13.1
>
> Local Lan:eth1
> eth1
> ip 10.0.0.1
> netmask 255.255.255.0
>
> I have set net.ipv4.ip_forward = 1 in /etc/sysctl.conf
>
> i also added the following command to my /etc/rc.d/rc.local script.
>
> route add -net 80.248.13.3 netmask 255.255.255.252 dev eth0
> route add -net 10.0.0.1 netmask 255.255.255.0 dev eth1
> route add -net 0.0.0.0 netmask 0.0.0.0 gw 80.248.13.1


All this seems ok.

> i think the problem might be with iptables, but I'm not sure what else
> to do to get it working. I will really appreciate any information that
> will enable me get this thing working. Thanks in advance


You will need to configure IP Tables to allow NAT/Masquerading
through your router machine. Theres a starter example on the sort
of 'firewall' script you need at:

http://www.tldp.org/HOWTO/IP-Masquer...FIREWALL-2.4.X

Cheers,

Dave.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
routing problem of Linux box CS Linux Networking 1 05-09-2006 08:47 PM
Linux Gateway routing problem KeesS Linux Networking 9 08-19-2005 09:08 AM
Some problem with firewall/routing Robert Linux Networking 2 05-14-2004 06:53 PM
Routing problem with linux Christian Vorholt Linux Networking 1 12-03-2003 01:40 PM
Linux Router/Firewall - Linux Client problem Fry Linux Networking 6 09-06-2003 02:25 AM



1 2 3 4 5 6 7 8 9 10 11