On Thu, 10 Jul 2008, Rony wrote:
> Dr. Sharukh K. R. Pavri. wrote:
> > I have a machine w/ kubuntu w/ a wlan0 (runing w/ ndiswrapper) connecting
> > to the net via braodband modem.
> >
> > I now want to connect my laptop to the net thru the broadband modem via
> > the wifi.
> >
> > I followed this link:
> >
> > http://forums.gentoo.org/viewtopic-t-274790-highlight-adhoc+wireless.html
> >
> > I managed to get the laptop talking to the kubuntu machine and I can even
> > browse the net on the laptop.
> >
> > The problem is that I have lost internet connectivity on the kubuntu
> > machine :( . No ping, no web access, zilch.
> >
> > I have the follwoing setup:
> >
> > modem <-> (pub.lic.I.P) PC <-> wifi (192.168.1.202) <-> (192.168.1.204)
> > laptop
> >
> > I have made the requisite changes in the commands shown on this page.
> >
> > where is the problem ?
> >
> > do I need any changes to this line ?
> >
> > route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.1.1
> >
> > I've changed it to
> >
> > route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.202
> >
>
> This line is anyway added in the other machines, not the router machine.
> What do the general network commands like ifconfig, route etc. reveal in
> the router machine?
>
> --
> Regards,
>
> Rony.
That command is only run on the laptop and not the router.
These are the outputs:
-------------------------------------
[EMAIL PROTECTED]:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.1.0 * 255.255.255.0 U 0 0 0
wlan0
172.16.76.0 * 255.255.255.0 U 0 0 0
vmnet8
202.88.160.0 * 255.255.255.0 U 0 0 0
eth0
192.168.237.0 * 255.255.255.0 U 0 0 0
vmnet1
link-local * 255.255.0.0 U 1000 0 0
eth0
default 202.88.160.161 0.0.0.0 UG 0 0 0
eth0
----------------------------------------
[EMAIL PROTECTED]:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:19:D1:70:A1:8B
inet addr:202.XXX.XXX.XXX Bcast:202.88.160.255
Mask:255.255.255.0
inet6 addr: fe80::219:d1ff:fe70:a18b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:182695 errors:0 dropped:0 overruns:0 frame:0
TX packets:27256 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46662548 (44.5 MiB) TX bytes:2269779 (2.1 MiB)
[EMAIL PROTECTED]:~$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:13:F7:06:AB:76
inet addr:192.168.1.202 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::213:f7ff:fe06:ab76/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:168 (168.0 b)
Interrupt:17 Memory:50000000-50002000
--------------------------------------------
[EMAIL PROTECTED]:~$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:off/any
Mode:Ad-Hoc Frequency:2.462 GHz Cell: Not-Associated
Bit Rate=2 Mb/s Tx-Power:32 dBm
RTS thr=2347 B Fragment thr=2346 B
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
vmnet8 no wireless extensions.
vmnet1 no wireless extensions.
------------------------------------------------
[EMAIL PROTECTED]:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
auto eth0
iface eth0 inet static
address 202.XXX.XXX.XXX
netmask 255.255.255.0
gateway 202.88.160.161
#auto eth1
#iface eth1 inet dhcp
#auto eth2
#iface eth2 inet dhcp
#auto ath0
#iface ath0 inet dhcp
auto wlan0
iface wlan0 inet static
address 192.168.1.202
netmask 255.255.255.0
gateway 202.XXX.XXX.XXX
broadcast 192.168.1.255
wireless_mode ad-hoc
wireless-essid "secret"
-----------------------------------------------
I have added a line for essid in /etc/network/interfaces but iwconfig
shows it to be off/any
----------------------------------------------
I am able to ping to and from my router machine to my laptop, it's just
that when I run the iptables commands that the router machine is no longer
able to access the net itself.
If I then do a /etc/init.d/networking restart, the router machine is able
to connect to the internet but the laptop is cut off.
thanks,
Sharukh.
--
Dr. Sharukh K. R. Pavri. Homoeopath, Linuxer.
Complex problems have simple, easy to understand wrong answers.
--
http://mm.glug-bom.org/mailman/listinfo/linuxers