public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: YoYo Siska <yoyo@gl.ksp.sk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Routing problem ?
Date: Fri, 11 Jan 2008 15:39:08 +0100	[thread overview]
Message-ID: <47877F8C.6000902@gl.ksp.sk> (raw)
In-Reply-To: <51e438da0801101736j4e0f1f01lccf0d27817909942@mail.gmail.com>

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



  parent reply	other threads:[~2008-01-11 14:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11  1:36 [gentoo-user] Routing problem ? Holla
2008-01-11  3:14 ` kashani
2008-01-11  4:52   ` Mike Mazur
2008-01-11 15:18     ` Holla
2008-01-11 20:09     ` kashani
2008-01-13 11:12       ` Holla
2008-01-13 13:06         ` Hans-Werner Hilse
2008-01-16 12:22           ` Mick
2008-01-16 21:10             ` kashani
2008-01-17  1:31               ` Holla
2008-01-11 15:15   ` Holla
2008-01-11 14:39 ` YoYo Siska [this message]
2008-01-11 16:20   ` Holla
2008-01-11 17:50     ` [gentoo-user] " reader
  -- strict thread matches above, loose matches on Subject: below --
2008-01-11 17:14 [gentoo-user] " Richard Torres

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47877F8C.6000902@gl.ksp.sk \
    --to=yoyo@gl.ksp.sk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox