Holla wrote:
> Hi,
> I think I have a routing problem with network
> shown below (hope my ascii art survives)
> 
> From PC2, I cannot ping 192.168.1.1  and no internet.
> Also cannot ping ISP's DNS servers. But there is full
> connectivity between PC1 and PC2.
> 
> At PC2,
> # traceroute 192.168.1.1
> traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 40 byte packets
>  1  * * *
>  2  * * *
> 
> I reached upto this point by following up the
> gentoo howtos, but now stuck. Any pointers ?

as someone other said, you should setup NAT, there should be enough
information on the wiki, but basically
iptabales -t nat -A POSTROUTING -o eth0 -s 192.168.2.0/24 -j MASQUERADE
on PC1 should do it, but there might be better ways ;)
(note that you need some iptables stuff in the kernel)

one other thing, if nat doesn't work, some wireless aps (i'm thinking
about the 192.168.2.1) need to have correctly set up default gateway
etc... they sometimes try to be to smart and I had sometimes problems
when the router was connected as a wireless client to them...

btw, why don't you use the wireless on the ROUTER1 (doesn't seem you
want to do any firewalling on the PC1)? It might make things much
simpler... you could setup the other ap to connect to it in client mode
and all your network could then be on the 192.168.1.0/24 and I would
gues that your provider NATs the whole subnet...


yoyo


> 
> 
>                 192.168.1.1
> +-+           +------------+
> | |-----------|  Router1   |=========ASDL conn
> | |           +------------+
> | |
> | |
> | |
> | |    192.168.1.23  +-------+  192.168.2.43
> | |------------------|  PC1  |----))).............
> +-+                  +-------+                   .
>                                                  .
> Passive Hub                                      .
>                               192.168.2.1        .
>                              +------------+      .
>                              | Router2    |--)))..
>                              +------------+
>                                 |
>                                 |
>                              +------+
>                              | PC2  |
>                              +------+
>                              192.168.2.24
> 
> --------------------------------------------------------------
> Router1 (UTSStarCom ISP supplied) :
>  - router IP 192.168.1.1
>  - wireless enabled but not used
> 
> --------------------------------------------------------------
> PC1: (gentoo)
> 
>  - eth0 (192.168.1.23) and wireless (192.168.2.43)
>  - no iptables configuration
>  - routing table entries
>    Kernel IP routing table
>    Destination     Gateway         Genmask         Flags Metric Ref    Use 
> Iface
>    192.168.2.0     *               255.255.255.0   U     0      0        0 ra0
>    192.168.1.0     *               255.255.255.0   U     0      0        0 
> eth0
>    loopback        *               255.0.0.0       U     0      0        0 lo
>    default         192.168.1.1     0.0.0.0         UG    0      0        0 
> eth0
> 
> 
>  # echo "1"  >  /proc/sys/net/ipv4/ip_forward
> 
> 
> # Kernel Networking options
> #
> CONFIG_UNIX=y
> CONFIG_XFRM=y
> CONFIG_INET=y
> CONFIG_IP_ADVANCED_ROUTER=y
> CONFIG_ASK_IP_FIB_HASH=y
> CONFIG_IP_FIB_HASH=y
> CONFIG_IP_ROUTE_VERBOSE=y
> CONFIG_INET_XFRM_MODE_TRANSPORT=y
> CONFIG_INET_XFRM_MODE_TUNNEL=y
> CONFIG_INET_XFRM_MODE_TRANSPORT=y
> CONFIG_INET_XFRM_MODE_TUNNEL=y
> CONFIG_TCP_CONG_BIC=y
> --------------------------------------------------------------
> 
> Router2 (WRT54GL)
>  - router IP 192.168.2.1
>  - wireless enabled and used
> --------------------------------------------------------------
> PC2 (gentoo)
>  - static IP address 192.168.2.24
>  - routing table entries
> 
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 192.168.2.43    *               255.255.255.255 UH    0      0        0 eth0
> 192.168.2.0     *               255.255.255.0   U     0      0        0 eth0
> 192.168.1.0     192.168.2.43    255.255.255.0   UG    0      0        0 eth0
> loopback        *               255.0.0.0       U     0      0        0 lo
> default         192.168.2.43    0.0.0.0         UG    0      0        0 eth0


-- 
gentoo-user@lists.gentoo.org mailing list

Reply via email to