Juhan Leemet <(E-Mail Removed)> wrote in message news:<pan.2004.08.02.21.40.38.109044@logicognosis. com>...
> On Mon, 02 Aug 2004 08:22:15 -0700, Some_Other_Nerd wrote:
> > I am trying to test a gateway/server/firewall in a semi-fake
> > environment before using it for real, but for some reason, I can't get
> > it to ping the 'internet' computer.
>
> Which is the 'internet" computer? I don't see any labelled like that.
> Do you mean "a real computer on the real internet"? Something like
> www.ibm.com? I'll assume that's what you mean.
>
> Also, be aware that some gateways and/or machines specifically block ping!
> Which specific machine or site are you trying to ping?
>
> I assume you can do it directly from your "real-internet" gateway machine?
> and from your server machines and dhcp-clients attached to your hub? but
> not from your fake-internet machines behind your "gateway-test" machine?
>
> > layout:
> >
> > <real-internet>
> > \ | | | /
> > [isp]
> > |
> > {eth0}
> > (masquerade)
> > [gateway-current]
> > {eth1}
> > |
> > [--------hub----------] - - - <internal servers>
> > | | | | | !\!
> > <dhcp-clients> !\!
> > {eth1}
> > [gateway-test]
> > (masquerade)
> > {eth0}
> > |
> > [fake-internet]
> >
> > note:
> > %!\\!% is a disconnected cable (for testing)
> > %\{[^\}]*\}% is the network interface
> > %\[[^\]]*\]% is a single machine
> > %<[^>]*>% is a group of machines
> > %\([^\)]*\)% is a nat action
> > %(\||/|\-|\\)% is (part of) a cable
The Important part is
[gateway-test]
(masquerade)
{eth0} <-------1.1.1.2
| <----------------1.1.1.0/24
{eth0} <-------1.1.1.1
[fake-internet]
I can't ping between these two computers with or without masq'ing.
>
> This is totally incomprehensible to me. What are you trying to say?
>
> BTW, I'm not sure if you can apply NAT twice (nested?)? Normally, for an
> internal network you would just do routing, and not NAT. There is normally
> only one NAT done at the gateway, where you HAVE to mash all your IP
> connections onto a single IP address given you by your ISP. Anyone else?
>
> > details:
> >
> > gateway-test:
> > eth0:
> > address 1.1.1.2
> > netmask 255.255.255.0
> > network 1.1.1.0
> > broadcast 1.1.1.255
> > eth1:
> > address 192.168.1.65 (attached to a real LAN, using dhcp)
> > netmask 255.255.255.0
> > network 192.168.1.0
> > broadcast 1.1.1.255
> > gateway 192.168.1.1
> >
> > fake-internet:
> > eth0
> > address 1.1.1.1
> > netmask 255.255.255.0
> > network 1.1.1.0
> > broadcast 1.1.1.255
> >
> > gateway-current:
> > eth0
> > address 204.x.x.x
> > netmask 255.x.x.x
> > network 204.x.x.x
> > broadcast 204.x.x.x
> > gateway 204.x.x.x
> > eth1
> > address 192.168.1.1
> > netmask 255.255.255.0
> > network 192.168.1.0
> > broadcast 192.168.1.255
> >
> > LAN-dhcp:
> > address 192.168.1.32 - 192.168.1.100
> > netmask 255.255.255.0
> > network 192.168.1.32 - 192.168.1.100
> > broadcast 192.168.1.255
> > gateway 192.168.1.1
> >
> > LAN-static
> > address 192.168.1.2 - 192.168.1.31
> > netmask 255.255.255.0
> > network 192.168.1.32 - 192.168.1.100
> > broadcast 192.168.1.255
> > gateway 192.168.1.1
> >
> > TIA
The output of `route' on gateway-test is
Kernel IP Routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
1.1.1.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
on fake-internet it shows the same thing.
ifconfig on gateway-test shows:
eth0 Link encap:Ethernet HWaddr 00:01:02:EB:4F:8E
inet addr:1.1.1.2 Bcast:1.1.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:770000 errors:0 dropped:0 overruns:0 frame:0
TX packets:772291 errors:0 dropped:0 overruns:0 carrier:13
collisions:0 txqueuelen:100
RX bytes:75464210 (71.9 MiB) TX bytes:75601676 (72.0 MiB)
Interrupt:17 Base address:0xa000
eth1 Link encap:Ethernet HWaddr 00:60:08:12:33:FE
inet addr:192.168.1.68 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:907 errors:0 dropped:0 overruns:0 frame:0
TX packets:593 errors:0 dropped:0 overruns:0 carrier:512
collisions:0 txqueuelen:100
RX bytes:66311 (64.7 KiB) TX bytes:189157 (184.7 KiB)
Interrupt:17 Base address:0xa400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3455 errors:0 dropped:0 overruns:0 frame:0
TX packets:3455 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
on fake-internet:
eth0 Link encap:Ethernet HWaddr 00:A0:CC

E:25:F2
inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:ccff:fede:25f2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:100 errors:0 dropped:0 overruns:0 frame:0
TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16744 (16.3 KiB) TX bytes:6258 (6.1 KiB)
Interrupt:17 Base address:0xf000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:308 errors:0 dropped:0 overruns:0 frame:0
TX packets:308 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20838 (20.3 KiB) TX bytes:20838 (20.3 KiB)