Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sharing ppp connection with wlan interface

57 views
Skip to first unread message

Vinícius Massuchetto

unread,
Sep 20, 2009, 10:00:12 AM9/20/09
to
Dear all.

I've been trying to serve a ppp0 internet
connection through a wireless network. I made a
small script to be ran when i want to do that:

ifdown wlan0
iwconfig wlan0 essid "VinaNET" mode Ad-Hoc
ifconfig wlan0 192.168.0.254
echo 1 > /proc/sys/net/ipv4/ip_forward
/etc/init.d/dnsmasq stop
/etc/init.d/dnsmasq start
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

The script goes just fine and the client computer
can see the wireless network but can't connect, it
only keeps trying:

DHCPDISCOVER on ath0 to 255.255.255.255 port 67
interval x

Thanks.
--
Vinícius André Massuchetto
http://vinicius.soylocoporti.org.br


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Vinícius Massuchetto

unread,
Sep 20, 2009, 10:00:11 AM9/20/09
to
Oh Sorry... I forgot to mention an important info.

Here's my dnsmasq.conf file:

domain-needed
bogus-priv
interface=wlan0
dhcp-range=192.168.0.1,192.169.0.100,12h

Thanks again.


--
Vinícius André Massuchetto
http://vinicius.soylocoporti.org.br

Vinícius Massuchetto escreveu:

Celejar

unread,
Sep 21, 2009, 1:50:07 PM9/21/09
to
On Sun, 20 Sep 2009 10:49:35 -0300
Vinícius Massuchetto <vinici...@gmail.com> wrote:

> Dear all.
>
> I've been trying to serve a ppp0 internet
> connection through a wireless network. I made a
> small script to be ran when i want to do that:
>
> ifdown wlan0
> iwconfig wlan0 essid "VinaNET" mode Ad-Hoc
> ifconfig wlan0 192.168.0.254
> echo 1 > /proc/sys/net/ipv4/ip_forward
> /etc/init.d/dnsmasq stop
> /etc/init.d/dnsmasq start
> iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
>
> The script goes just fine and the client computer
> can see the wireless network but can't connect, it
> only keeps trying:
>
> DHCPDISCOVER on ath0 to 255.255.255.255 port 67
> interval x

I'm not sure that I understand exactly what you're trying to do here.
If you want the box in question to serve as a wireless AP / router
(i.e., the ppp connection is from the box, and clients connect
wirelessly to the box), then you should be configuring it with 'mode
master', or, more likely these days, using hostapd. If you have a
separate wireless AP, and you just want the box to be a dns server /
ppp host, then the mode should be 'managed', and the AP should be
configured to forward traffic to the box.

Please explain more clearly your network topology.

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator

Vinicius Massuchetto

unread,
Sep 21, 2009, 2:30:14 PM9/21/09
to
Hi. Thanks for helping.

On Mon, Sep 21, 2009 at 2:40 PM, Celejar <cel...@gmail.com> wrote:
> On Sun, 20 Sep 2009 10:49:35 -0300
> Vinícius Massuchetto <vinici...@gmail.com> wrote:
>
>> Dear all.
>>
>> I've been trying to serve a ppp0 internet
>> connection through a wireless network. I made a
>> small script to be ran when i want to do that:
>>
>> ifdown wlan0
>> iwconfig wlan0 essid "VinaNET" mode Ad-Hoc
>> ifconfig wlan0 192.168.0.254
>> echo 1 > /proc/sys/net/ipv4/ip_forward
>> /etc/init.d/dnsmasq stop
>> /etc/init.d/dnsmasq start
>> iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
>>
>> The script goes just fine and the client computer
>> can see the wireless network but can't connect, it
>> only keeps trying:
>>
>> DHCPDISCOVER on ath0 to 255.255.255.255 port 67
>> interval x
>
> I'm not sure that I understand exactly what you're trying to do here.
> If you want the box in question to serve as a wireless AP / router
> (i.e., the ppp connection is from the box, and clients connect
> wirelessly to the box)

That's exactly it. I've got a 3G modem connected to the box, and I
want other computers to get this connection wirelessly.

I followed this tutorial to get this configuration:
http://wiki.archlinux.org/index.php/Sharing_ppp_connection_with_wlan_interface

> then you should be configuring it with 'mode
> master', or, more likely these days, using hostapd.  If you have a
> separate wireless AP, and you just want the box to be a dns server /
> ppp host, then the mode should be 'managed', and the AP should be
> configured to forward traffic to the box.

I'm not sure about what mode to use in case I want the computer to be
the router. I found this information randomically defined in different
places while looking for it on the web.

As I said, the client computer sees the wireless network I created,
but can't connect to it. The syslog of the server computer keeps
showing this:

Sep 20 23:46:48 vinicius kernel: [ 3349.172165] wlan0: No active IBSS
STAs - trying to scan for other IBSS networks with same SSID (merge)
Sep 20 23:46:51 vinicius kernel: [ 3351.704879] wlan0: Selected IBSS
BSSID 0e:45:9e:94:06:07 based on configured SSID

> Please explain more clearly your network topology.

Hope it is clear enough now.

Thanks again.
Vinicius

Celejar

unread,
Sep 21, 2009, 3:10:08 PM9/21/09
to
On Mon, 21 Sep 2009 15:28:06 -0300
Vinicius Massuchetto <vinici...@gmail.com> wrote:

...

> That's exactly it. I've got a 3G modem connected to the box, and I
> want other computers to get this connection wirelessly.
>
> I followed this tutorial to get this configuration:
> http://wiki.archlinux.org/index.php/Sharing_ppp_connection_with_wlan_interface
>
> > then you should be configuring it with 'mode
> > master', or, more likely these days, using hostapd.  If you have a
> > separate wireless AP, and you just want the box to be a dns server /
> > ppp host, then the mode should be 'managed', and the AP should be
> > configured to forward traffic to the box.

You'd normally use 'master' / hostapd where the wireless clients are
connecting to the box. I've never used ad-hoc mode, and I don't know
anything about it.

> I'm not sure about what mode to use in case I want the computer to be
> the router. I found this information randomically defined in different
> places while looking for it on the web.
>
> As I said, the client computer sees the wireless network I created,
> but can't connect to it. The syslog of the server computer keeps
> showing this:
>
> Sep 20 23:46:48 vinicius kernel: [ 3349.172165] wlan0: No active IBSS
> STAs - trying to scan for other IBSS networks with same SSID (merge)
> Sep 20 23:46:51 vinicius kernel: [ 3351.704879] wlan0: Selected IBSS
> BSSID 0e:45:9e:94:06:07 based on configured SSID

This sounds like ad-hoc mode related stuff. Try setting up master
mode; the exact method will depend on what chipset / driver you're
using.

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator

Vinícius Massuchetto

unread,
Sep 21, 2009, 10:20:07 PM9/21/09
to
Celejar escreveu:

[...]

> You'd normally use 'master' / hostapd where the wireless clients are
> connecting to the box. I've never used ad-hoc mode, and I don't know
> anything about it.

I've been trying to set it to master mode, but I'm
starting to think that this card doesn't support
it. How can I confirm?

$ iwconfig wlan0 mode master
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.

$ lspci | grep Wireless
0c:00.0 Network controller: Intel Corporation
PRO/Wireless 3945ABG [Golan] Network Connection
(rev 02)

$ apt-cache show firmware-iwlwifi
Version: 0.18

Thanks
Vinicius

Celejar

unread,
Sep 21, 2009, 10:40:08 PM9/21/09
to
On Mon, 21 Sep 2009 23:18:50 -0300
Vinícius Massuchetto <vinici...@gmail.com> wrote:

> Celejar escreveu:
>
> [...]
>
> > You'd normally use 'master' / hostapd where the wireless clients are
> > connecting to the box. I've never used ad-hoc mode, and I don't
> > know anything about it.
>
> I've been trying to set it to master mode, but I'm
> starting to think that this card doesn't support
> it. How can I confirm?
>
> $ iwconfig wlan0 mode master
> Error for wireless request "Set Mode" (8B06) :
> SET failed on device wlan0 ; Invalid argument.
>
> $ lspci | grep Wireless
> 0c:00.0 Network controller: Intel Corporation
> PRO/Wireless 3945ABG [Golan] Network Connection
> (rev 02)

This page claims that iwlwifi (iwl3945) can't do AP:

http://linuxwireless.org/en/users/Drivers

For (most?) modern cards that can, you'll want to read:

http://linuxwireless.org/en/users/Documentation/hostapd

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator

Vinicius Massuchetto

unread,
Sep 22, 2009, 7:50:04 AM9/22/09
to
On Tue, Sep 22, 2009 at 8:38 AM, Vinicius Massuchetto
<vinici...@gmail.com> wrote:

> On Mon, Sep 21, 2009 at 11:35 PM, Celejar <cel...@gmail.com> wrote:
>> On Mon, 21 Sep 2009 23:18:50 -0300
>> Vinícius Massuchetto <vinici...@gmail.com> wrote:
>>> Celejar escreveu:

[...]

>> $ lspci | grep Wireless


>> 0c:00.0 Network controller: Intel Corporation
>> PRO/Wireless 3945ABG [Golan] Network Connection
>> (rev 02)
>
> This page claims that iwlwifi (iwl3945) can't do AP:
> http://linuxwireless.org/en/users/Drivers

How pity.
Is that a driver or a hardware limitation?
--
Vinicius

Celejar

unread,
Sep 22, 2009, 9:30:17 AM9/22/09
to
[back on list]

On Tue, 22 Sep 2009 08:38:06 -0300
Vinicius Massuchetto <vinici...@gmail.com> wrote:

> On Mon, Sep 21, 2009 at 11:35 PM, Celejar <cel...@gmail.com> wrote:

...

> > This page claims that iwlwifi (iwl3945) can't do AP:
> > http://linuxwireless.org/en/users/Drivers
>

> How pity.
> Is that a driver or a hardware limitation?

I really don't know; I don't have any Intel wireless hardware.

0 new messages