Re: Using a linux server as a firewall

From: Jim Fischer (jfischer_link5809_at_now.here.com)
Date: 11/21/03


Date: Fri, 21 Nov 2003 15:18:14 -0600

Lyle H. Gray wrote:
> Redhat Linux 7.3.
> Two ethernet cards:
>
> eth0 Link encap:Ethernet HWaddr 00:60:08:9D:9D:A1
> inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:386260 errors:0 dropped:0 overruns:0 frame:0
> TX packets:333085 errors:0 dropped:0 overruns:0 carrier:27
> collisions:10054 txqueuelen:100
> RX bytes:29697918 (28.3 Mb) TX bytes:139509719 (133.0 Mb)
> Interrupt:10 Base address:0x310
>
> eth1 Link encap:Ethernet HWaddr 00:01:02:64:0A:6B
> inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:4946 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1811 errors:0 dropped:0 overruns:0 carrier:0
> collisions:2 txqueuelen:100
> RX bytes:602307 (588.1 Kb) TX bytes:216816 (211.7 Kb)
> Interrupt:11 Base address:0xdc80
>
> eth0 is connected to 4 port router, which is connected to ADSL modem.
> eth1 is connected to 8 port hub, which is connected to other systems on
> the LAN.
>
> Output of route (collapsed slightly to fit width):
>
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.1.0 192.168.1.2 255.255.255.0 UG 0 0 0 eth0
> 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
> 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
> 127.0.0.0 * 255.0.0.0 U 0 0 0 lo
> default eth0 0.0.0.0 UG 0 0 0 eth0
>
> IP address of router is 192.168.1.1.
> IP address of eth0 is 192.168.1.2.
> IP address of eth1 is 192.168.1.102.
>
> Able to ping the router through eth0 with no problem.
>
> Problem: Cannot ping any systems on LAN through eth1 -- unless forced,
> all attempts to ping go through eth0 (default gateway, no surprise).
> When cables are switched to connect eth0 to the LAN, can ping the LAN
> through eth0 with no problems.
>
> iptables settings all set to ACCEPT to simplify testing of initial
> configuration (I'll worry about that later -- first things first).
>
> So, I've obviously missed something. Any suggestions for how to get eth1
> to "see" the LAN?
>
> [FollowUps set to comp.os.linux.networking]

You seem to be using the same IP address (192.168.1/24) on both sides of
your firewall/NAT box. This is definitely a problem. The firewall/NAT
box acts like a router, and routers join together network segments that
have *different* IP addresses. In other words, the networks on the two
sides of your firewall/NAT box must have different IP addresses. For
example, you could assign the IP address 192.168.1/24 to your "DMZ"
network, and the IP address "192.168.2/24" to your internal/private network:

    Your xDSL router/modem
     | (192.168.1.1/24)
     |
     | Your "DMZ" network (192.168.1/24)
     |
     | (eth0 - 192.168.1.2/24)
    Your Linux firewall/NAT box
     | (eth1 - 192.168.2.1/24)
     |
     | Your internal/private network (192.168.2/24)
     |
    (The hosts on your private network)

-- 
Jim
To reply by email, remove "link" and change "now.here" to "yahoo"
jfischer_link5809{at}now.here.com


Relevant Pages

  • Re: Loss of Connectivity on Only One PC on a LAN
    ... When you ran the Network Setup Wizard, ... The original setup of the LAN was done entirely by the user of the other PC on that LAN in July. ... I use a LAN connection which consists of two PCs each connected to a Linksys BEFSR 41 Router. ...
    (microsoft.public.windowsxp.network_web)
  • Re: VPN over wireless
    ... You will still the need the Router to issue DHCP and wireless ... network but still access to the internet. ... LAN Router Wireless Router ...
    (microsoft.public.windows.server.sbs)
  • Re: VPN over wireless
    ... I also 'haunted' the MS wireless newsgroup with this issue. ... You will still the need the Router to issue DHCP and ... wireless to the Guest network. ... LAN Router Wireless Router ...
    (microsoft.public.windows.server.sbs)
  • RE: Hellllllloooooo...is anyone there? WAS: RE: Mysterious problem: cant backtrack an unwise router
    ... > I have a small home network which ran wonderfully for several ... The home LAN is all on static IPs: ... > MS Remote Desktop from my XP workstation to connect to my ... > same router on my home LAN and disabling the RH 7.0 box as ...
    (RedHat)
  • Re: What does "ICMP to 224.0.0.2" mean?
    ... >>any LAN at all. ... > Your cable modem is effectively a 1-port router. ... > to be used by network protocols on a local network segment. ...
    (alt.computer.security)