http://www.tutorialsall.com/SLACKWARE/routing-between/
I have exactly the problem as the one in the above link. I also believe that the solution (the one by Eric Hameleers) is also the same: "configure your internet router with an additional return static route for the "hidden" network segment".
The current status of the router (a FC5 box):
[root@Sunflower ~]# echo "1" > /proc/sys/net/ipv4/ip_forward [root@Sunflower ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:C0:9F:4A:62:A8 inet addr:172.16.16.144 Bcast:172.16.19.255 Mask:255.255.252.0 inet6 addr: fe80::2c0:9fff:fe4a:62a8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:149195 errors:0 dropped:0 overruns:0 frame:0 TX packets:10836 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16685165 (15.9 MiB) TX bytes:3077530 (2.9 MiB) Interrupt:10 Base address:0xc800
eth1 Link encap:Ethernet HWaddr 00:0C:F1:36:27:6F inet addr:192.168.0.144 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:f1ff:fe36:276f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:11971 errors:393 dropped:385 overruns:0 frame:0 TX packets:9938 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3405233 (3.2 MiB) TX bytes:3280636 (3.1 MiB) Interrupt:11 Base address:0xe000 Memory:e0204000-e0204fff
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:14811 errors:0 dropped:0 overruns:0 frame:0 TX packets:14811 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:10120532 (9.6 MiB) TX bytes:10120532 (9.6 MiB)
[root@Sunflower ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 172.16.16.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 0.0.0.0 172.16.16.1 0.0.0.0 UG 0 0 0 eth0 [root@Sunflower ~]#
I need machines on the 192.168.0.x network to be able to access the proxy 172.16.16.2 on the 172.16.16.x network. The router is 172.16.16.144. I have set 192.168.0.144 as the gateway on the 192.168.0.x machines. The machines on the 192.168.0.x network can ping each other, can ping 172.16.16.144, but not any other machine on 172.16.16.x. It seems that the outward packets are getting routed but they are lost on the way back to the 192.168.0.x network.
What would be the exact 'route' command to fix this. I would like to avoid the iptables/ipchains and the NAT way of setting this up.
Please help.
Regards, Debarshi
Debarshi,
Quoting Debarshi 'Rishi' Ray debarshi.ray@gmail.com:
What would be the exact 'route' command to fix this. I would like to avoid the iptables/ipchains and the NAT way of setting this up.
Did you try man route ?? Please do your home work well before posting on list. Here for your ignorance am pasting output directly from "man route" "route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4 This command adds the net "192.57.66.x" to be gatewayed through the former route to the SLIP interface."
Just replace those IPs with relevant IPs after reading the route manual.
Thanks & Regards, Mitul Limbani, Founder & CEO, Enterux Solutions, The Enterprise Linux Company (TM), www.enterux.com
On 8/2/06, Mitul Limbani mitul@enterux.com wrote:
Debarshi,
Quoting Debarshi 'Rishi' Ray debarshi.ray@gmail.com:
What would be the exact 'route' command to fix this. I would like to avoid the iptables/ipchains and the NAT way of setting this up.
Did you try man route ?? Please do your home work well before posting on list. Here for your ignorance am pasting output directly from "man route" "route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4 This command adds the net "192.57.66.x" to be gatewayed through the former route to the SLIP interface."
What does he do if he reboots the server or restarts the network service?
Regards, NMK.
On 02/08/06 00:27 +0530, Debarshi 'Rishi' Ray wrote: <snip>
I need machines on the 192.168.0.x network to be able to access the proxy 172.16.16.2 on the 172.16.16.x network. The router is 172.16.16.144. I have set 192.168.0.144 as the gateway on the 192.168.0.x machines. The machines on the 192.168.0.x network can ping each other, can ping 172.16.16.144, but not any other machine on 172.16.16.x. It seems that the outward packets are getting routed but they are lost on the way back to the 192.168.0.x network.
Can the response packets make it back? Hint: tcpdump(8) is your friend for such things.
What is the default route on the 172.16.16.x network? If it does not point to 172.16.16.144, you need a route on the default gateway for that network routing 192.168.0.0/24 differently.
route add -net 192.168.0.0/24 gw 172.16.16.144
Devdas Bhagat
Hello Rishi,
Debarshi 'Rishi' Ray wrote:
I need machines on the 192.168.0.x network to be able to access the proxy 172.16.16.2 on the 172.16.16.x network. The router is 172.16.16.144. I have set 192.168.0.144 as the gateway on the 192.168.0.x machines. The machines on the 192.168.0.x network can ping each other, can ping 172.16.16.144, but not any other machine on 172.16.16.x. It seems that the outward packets are getting routed but they are lost on the way back to the 192.168.0.x network.
What is the gateway for the machines in the 172.16.16.x network ?.
What would be the exact 'route' command to fix this. I would like to avoid the iptables/ipchains and the NAT way of setting this up.
May be the answer to your problems lies in adding a static route on the "gateway" machine to the internet.
use : route add net 192.168.0.0/255.255.255.0 gw 172.16.16.144 eth0( or eth1 depending on the internal interface of the gateway)
This will make sure that any packets destined for the network 192.168.0.0 ( which is behind the router) is sent by the gateway to the router and not to the internet.
Richard