Click to See Complete Forum and Search --> : Ip forwading question


Radicalm16
11-25-2003, 12:16 AM
Ok here's the thing...

I want my Slack box to share my dial-up connection with my debian box in my home lan..

I went to my debian box I stablish de default route aiming to my Slack box.

# route add default gw 192.168.1.3

Now when i try to ping my DNS servers just to see if the machine is forwading the packets it doesn't work :( ...


then i took my guindowz machine and setted it up in other subnet (192.168.2.0) and set the gateway to my slackbox,,,

guindows box:
ip: 192.168.2.10
S/M: 255.255.255.0
gateway: 192.168.2.1

configured a sub-interface in my Slack box' ethernet with ip 192.168.2.1... pinged my guindows box and everything went fine...

then went to my debian machine withouth touching again the routing table (it had already the default route setted up)

and my pings went straight to my guindows machine (so ip forwading in my slack is working fine)....

Now, why i'm not able to ping internet???
Do I need to set up anything else to get it working???
Some maskarade, iptables???

here comes my ifconfig and route -n outs at my slack box:

# ifconfig


[root@mega:/home/offtopic] # ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:E3:11:BA:33
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:505 errors:0 dropped:0 overruns:0 frame:0
TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:45963 (44.8 Kb) TX bytes:9104 (8.8 Kb)
Interrupt:17 Base address:0xa000

eth0:1 Link encap:Ethernet HWaddr 00:02:E3:11:BA:33
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:17 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2688 (2.6 Kb) TX bytes:2688 (2.6 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:200.44.16.4 P-t-P:200.44.16.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5350 errors:2 dropped:0 overruns:0 frame:0
TX packets:5631 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2289415 (2.1 Mb) TX bytes:665063 (649.4 Kb)




#route -n:




[root@mega:/home/offtopic] # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
200.44.16.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 200.44.16.1 0.0.0.0 UG 0 0 0 ppp0





If u need more information, just let me know...

Any link to good reading stuff about it would be welcomed :D

Regards,
Radicalm16.

Radicalm16
11-25-2003, 12:28 PM
The Ip forwading is up by default



[offtopic@mega:~] $ cat /proc/sys/net/ipv4/ip_forward
1


and my slack box has been able to serve as a Gateway between my other comps without probs....

My prob appears now that I try to share my dial-up Internet connection with my other comps and it's not working... I've been think about it, and realize that maybe my slack is forwading but as my ISP only has knowledge of my slack box and not my other comps it's not able to send an "echo reply" back to my other comps.... Now it's obvious I need some kind of masquerade to accomplish the sharing... I'll start my how-to and documentation hunting but any link will be grate :D

Regards,
Francisco Moreno

jumpedintothefire
11-25-2003, 08:16 PM
http://justlinux.com/forum/showthread.php?s=&threadid=116963

Should do the trick.. for a quick test.