1 |
Holla wrote: |
2 |
> Hi, |
3 |
> I think I have a routing problem with network |
4 |
> shown below (hope my ascii art survives) |
5 |
> |
6 |
> From PC2, I cannot ping 192.168.1.1 and no internet. |
7 |
> Also cannot ping ISP's DNS servers. But there is full |
8 |
> connectivity between PC1 and PC2. |
9 |
> |
10 |
> At PC2, |
11 |
> # traceroute 192.168.1.1 |
12 |
> traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 40 byte packets |
13 |
> 1 * * * |
14 |
> 2 * * * |
15 |
> |
16 |
> I reached upto this point by following up the |
17 |
> gentoo howtos, but now stuck. Any pointers ? |
18 |
|
19 |
as someone other said, you should setup NAT, there should be enough |
20 |
information on the wiki, but basically |
21 |
iptabales -t nat -A POSTROUTING -o eth0 -s 192.168.2.0/24 -j MASQUERADE |
22 |
on PC1 should do it, but there might be better ways ;) |
23 |
(note that you need some iptables stuff in the kernel) |
24 |
|
25 |
one other thing, if nat doesn't work, some wireless aps (i'm thinking |
26 |
about the 192.168.2.1) need to have correctly set up default gateway |
27 |
etc... they sometimes try to be to smart and I had sometimes problems |
28 |
when the router was connected as a wireless client to them... |
29 |
|
30 |
btw, why don't you use the wireless on the ROUTER1 (doesn't seem you |
31 |
want to do any firewalling on the PC1)? It might make things much |
32 |
simpler... you could setup the other ap to connect to it in client mode |
33 |
and all your network could then be on the 192.168.1.0/24 and I would |
34 |
gues that your provider NATs the whole subnet... |
35 |
|
36 |
|
37 |
yoyo |
38 |
|
39 |
|
40 |
> |
41 |
> |
42 |
> 192.168.1.1 |
43 |
> +-+ +------------+ |
44 |
> | |-----------| Router1 |=========ASDL conn |
45 |
> | | +------------+ |
46 |
> | | |
47 |
> | | |
48 |
> | | |
49 |
> | | 192.168.1.23 +-------+ 192.168.2.43 |
50 |
> | |------------------| PC1 |----)))............. |
51 |
> +-+ +-------+ . |
52 |
> . |
53 |
> Passive Hub . |
54 |
> 192.168.2.1 . |
55 |
> +------------+ . |
56 |
> | Router2 |--))).. |
57 |
> +------------+ |
58 |
> | |
59 |
> | |
60 |
> +------+ |
61 |
> | PC2 | |
62 |
> +------+ |
63 |
> 192.168.2.24 |
64 |
> |
65 |
> -------------------------------------------------------------- |
66 |
> Router1 (UTSStarCom ISP supplied) : |
67 |
> - router IP 192.168.1.1 |
68 |
> - wireless enabled but not used |
69 |
> |
70 |
> -------------------------------------------------------------- |
71 |
> PC1: (gentoo) |
72 |
> |
73 |
> - eth0 (192.168.1.23) and wireless (192.168.2.43) |
74 |
> - no iptables configuration |
75 |
> - routing table entries |
76 |
> Kernel IP routing table |
77 |
> Destination Gateway Genmask Flags Metric Ref Use Iface |
78 |
> 192.168.2.0 * 255.255.255.0 U 0 0 0 ra0 |
79 |
> 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 |
80 |
> loopback * 255.0.0.0 U 0 0 0 lo |
81 |
> default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 |
82 |
> |
83 |
> |
84 |
> # echo "1" > /proc/sys/net/ipv4/ip_forward |
85 |
> |
86 |
> |
87 |
> # Kernel Networking options |
88 |
> # |
89 |
> CONFIG_UNIX=y |
90 |
> CONFIG_XFRM=y |
91 |
> CONFIG_INET=y |
92 |
> CONFIG_IP_ADVANCED_ROUTER=y |
93 |
> CONFIG_ASK_IP_FIB_HASH=y |
94 |
> CONFIG_IP_FIB_HASH=y |
95 |
> CONFIG_IP_ROUTE_VERBOSE=y |
96 |
> CONFIG_INET_XFRM_MODE_TRANSPORT=y |
97 |
> CONFIG_INET_XFRM_MODE_TUNNEL=y |
98 |
> CONFIG_INET_XFRM_MODE_TRANSPORT=y |
99 |
> CONFIG_INET_XFRM_MODE_TUNNEL=y |
100 |
> CONFIG_TCP_CONG_BIC=y |
101 |
> -------------------------------------------------------------- |
102 |
> |
103 |
> Router2 (WRT54GL) |
104 |
> - router IP 192.168.2.1 |
105 |
> - wireless enabled and used |
106 |
> -------------------------------------------------------------- |
107 |
> PC2 (gentoo) |
108 |
> - static IP address 192.168.2.24 |
109 |
> - routing table entries |
110 |
> |
111 |
> Kernel IP routing table |
112 |
> Destination Gateway Genmask Flags Metric Ref Use Iface |
113 |
> 192.168.2.43 * 255.255.255.255 UH 0 0 0 eth0 |
114 |
> 192.168.2.0 * 255.255.255.0 U 0 0 0 eth0 |
115 |
> 192.168.1.0 192.168.2.43 255.255.255.0 UG 0 0 0 eth0 |
116 |
> loopback * 255.0.0.0 U 0 0 0 lo |
117 |
> default 192.168.2.43 0.0.0.0 UG 0 0 0 eth0 |
118 |
|
119 |
|
120 |
-- |
121 |
gentoo-user@l.g.o mailing list |