Re: Linux Router

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2005-02-06 at 12:36, spdesai@xxxxxxxxx wrote:
> Hi
> 
> I have one linux machine with two NIC cards. One is connected to internet and 
> one is private PC. Below is my IP configuration
> 
> eth0: Valid IP: xxx.xxx.xxx.68
>       Mask: 255.255.255.192
>       Gateway: xxx.xxx.xxx.65  
> 
> eth1: Invalid IP: 192.168.1.1
>        Mask : 255.255.255.0
>       Gateway: xxx.xxx.xxx.65 

you shouldn't have a default gateway on your internal interface. 
default gateway == gateway of last resort; i.e., there's one (barring
some specific multipath routing situation).

> Now when i connect eth1 to window machine. i can ping up to eth0 valid ip i.e 
> xxx.xxx.xxx.68 but could not ping xxx.xxx.xxx.65 which is gateway ip of linux.
> 
> I have enable ip_forward to 1 in linux machine.
> 
> My window machine ip is: 
> IP: 192.168.1.2
> Mask:255.255.255.0
> GW: 192.168.1.1
> 
> Pl. give me the solution so i can ping xxx.xxx.xxx.65 from my window machine.

my guess is that you haven't created an outbound MASQ/SNAT rule (at
least you don't say you have):

  # IF YOUR ETH0 IP IS STATIC
  iptables -t nat -A POSTROUTING -o eth0 \
    -j SNAT --to-source xxx.xxx.xxx.68

-OR-

  # IF YOUR ETH0 IP IS DYNAMIC
  iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

-j

--
"I've always wondered if there was a god. And now I know there is --
 and it's me."
	--The Simpsons



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux