You are not logged in.

#101 2014-09-23 16:37:15

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

'brctl setfd $BRIDGE_IFACE 0' and 'ip link set dev $WIRED_IFACE up' was missing ;p
I know that it can be a nice feature put it will complicate create_ap in many ways. But I will see, maybe I will change my mind.

Offline

#102 2014-09-24 07:59:26

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

OBLiQUE wrote:

Please open an issue here: https://github.com/oblique/create_ap/issues and post the create_ap arguments that you use and the output.

Done. Please report here when you find some clue.


do it good first, it will be faster than do it twice the saint wink

Offline

#103 2014-09-24 12:26:02

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

It looks like your wrapper script is the problem, I replied to the issue with more details.
Please check github regularly (or check your mails) because I will need more infos from you and it's better to talk only there about the issue.

Offline

#104 2014-09-24 22:08:16

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

Finally it's working now and without WiFi dongle. I had  swapped from NM to wicd, otherwise in NM the interface will be turned off.
I didn't modified my wrapper and even started manually it's working fine.


do it good first, it will be faster than do it twice the saint wink

Offline

#105 2014-09-25 05:32:46

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

The problem was the locale of the command outputs, because you have Chinese output the script couldn't parse correctly the output of NM.
This had as a result to not be able to set the device to unmanaged, so NM was interfering.
I fixed the issue by setting LC_ALL=C at the beginning of the script. It must work correctly now.

Please get the last version of the script from github to test it. AUR is usually updated every 1-2 days (I'm not the maintainer).

Offline

#106 2014-10-03 12:12:21

QuiXXotic
Member
Registered: 2014-10-03
Posts: 1

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

Yes im noob and im getting this error.

root@alarmpi ~]# ./create_ap -n wlan0 AP asperitas
-bash: ./create_ap: Permission denied
[root@alarmpi ~]# chmod 755 create_ap
[root@alarmpi ~]# ./create_ap -n wlan0 AP asperitas
./create_ap: line 5: syntax error near unexpected token `newline'
./create_ap: line 5: `<!DOCTYPE html>'

Suggestions would be appreciated big_smile

Offline

#107 2014-10-03 12:41:40

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

I doubt you installed from AUR. It seems that you tried to download from the web site and the response is not a bash script, but a html web page.

@ OBLiQUE
I'm grateful for your efforts, now even ubuntunian will benefit of your script (when using one only WiFi interface), but there's a small fee to pay, kill network-manager. This is also for Arch.
Can we figure out how to keep NM and use create_ap?

Last edited by TheSaint (2014-10-03 12:47:15)


do it good first, it will be faster than do it twice the saint wink

Offline

#108 2014-10-03 22:38:05

theodore
Member
Registered: 2008-09-09
Posts: 151

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

OBLiQUE many respects from my part as well for the script, things are much easier with it.

Now my situation. I can manage to share internet using the following command:

sudo create_ap --no-virt wifi1 net0 SSID Passphrase

and I can successfully connect to internet with my rest of devices (i.e. laptop, smartphone). However, I was trying to use the KDEconnect application in order to connect the smartphone with the desktop which works as the AP. Both desktop and smartphone recognize/find each other through the KDEconnect application but I cannot manage to pair them. Does anyone know if it able to pair them somehow.

Offline

#109 2014-10-04 06:17:55

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

@theodore
I think that connections via PAN and bluetooth are not covered by this script. Am I wrongly interpreting your meanings?


do it good first, it will be faster than do it twice the saint wink

Offline

#110 2014-10-04 21:14:04

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

TheSaint wrote:

@ OBLiQUE
I'm grateful for your efforts, now even ubuntunian will benefit of your script (when using one only WiFi interface), but there's a small fee to pay, kill network-manager. This is also for Arch.
Can we figure out how to keep NM and use create_ap?

With NetworkManager below 0.9.10.0 there is no way to make it work because a feature is missing. I use NM in Arch and everything works perfect.. I don't know what you're talking about..

Offline

#111 2014-10-04 21:16:54

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

@QuiXXotic do the following:

wget https://raw.githubusercontent.com/oblique/create_ap/master/create_ap
chmod +x create_ap
./create_ap -n wlan0 AP asperitas

Offline

#112 2014-10-04 21:31:12

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

theodore wrote:

OBLiQUE many respects from my part as well for the script, things are much easier with it.

Now my situation. I can manage to share internet using the following command:

sudo create_ap --no-virt wifi1 net0 SSID Passphrase

and I can successfully connect to internet with my rest of devices (i.e. laptop, smartphone). However, I was trying to use the KDEconnect application in order to connect the smartphone with the desktop which works as the AP. Both desktop and smartphone recognize/find each other through the KDEconnect application but I cannot manage to pair them. Does anyone know if it able to pair them somehow.

I don't think that this is related to create_ap. Maybe it's a bug in KDEconnect (unrelated to the AP) or maybe you have a firewall that is blocking KDEconnect. You can see here that KDEconnect use 1714 util 1764 TCP and UDP ports. So, you can do the following to open the ports:

#!/bin/bash
for x in $(seq 1714 1764); do
    iptables -I INPUT -p tcp -m tcp --dport $x -j ACCEPT
    iptables -I INPUT -p udp -m udp --dport $x -j ACCEPT
done

Or find which firewall you are using and do it properly.

Last edited by OBLiQUE (2014-10-04 21:47:34)

Offline

#113 2014-10-07 09:46:26

theodore
Member
Registered: 2008-09-09
Posts: 151

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

OBLiQUE wrote:
theodore wrote:

OBLiQUE many respects from my part as well for the script, things are much easier with it.

Now my situation. I can manage to share internet using the following command:

sudo create_ap --no-virt wifi1 net0 SSID Passphrase

and I can successfully connect to internet with my rest of devices (i.e. laptop, smartphone). However, I was trying to use the KDEconnect application in order to connect the smartphone with the desktop which works as the AP. Both desktop and smartphone recognize/find each other through the KDEconnect application but I cannot manage to pair them. Does anyone know if it able to pair them somehow.

I don't think that this is related to create_ap. Maybe it's a bug in KDEconnect (unrelated to the AP) or maybe you have a firewall that is blocking KDEconnect. You can see here that KDEconnect use 1714 util 1764 TCP and UDP ports. So, you can do the following to open the ports:

#!/bin/bash
for x in $(seq 1714 1764); do
    iptables -I INPUT -p tcp -m tcp --dport $x -j ACCEPT
    iptables -I INPUT -p udp -m udp --dport $x -j ACCEPT
done

Or find which firewall you are using and do it properly.


OBLiQUE you are a trully savier tongue
opening the ports worked like a charm
thank you again smile

Offline

#114 2014-10-15 13:07:12

dummyuser
Member
Registered: 2014-10-15
Posts: 2

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

first of all THANKS @OBLiQUE for this useful script!

Let's say I just need it up for few hours and I won't be at my computer to close it.
If I just kill (or soft kill ) the job from another console, or use 'timeout' by launching the script, it just ends,  without "Doing cleanup..."
I have to manually put down br0 and wlan0....

There's any better way to "emulate" ctrl+C and close the created ap *with* proper cleanup ?

Last edited by dummyuser (2014-10-15 13:07:57)

Offline

#115 2014-10-16 08:20:11

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

There are 2 ways:

1) You can use the systemd service. Just edit /lib/systemd/system/create_ap.service and put the parameters you want. After that you can use the start/stop of systemctl.
2) Kill the hostapd. If this is the only AP that is running, then just use: killall hostapd

BTW, if you put down manually the interfaces, hostapd doesn't exit, so create_ap doesn't exit too.

Offline

#116 2014-10-16 11:19:12

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

What is the default create_ap WPD ?
I'd rather like to use /tmp.


do it good first, it will be faster than do it twice the saint wink

Offline

#117 2014-10-16 11:26:09

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

create_ap it doesn't change a working directory but it uses absolute paths and it writes only in /tmp.
when you run it, you will get something like:

Config dir: /tmp/create_ap.wlan0.conf.41iyR40w
...

The letters after the last dot (in my case 41iyR40w) are random. This is where create_ap write the configs and some other infos that are needed.

Last edited by OBLiQUE (2014-10-16 11:26:25)

Offline

#118 2014-10-16 11:32:37

dummyuser
Member
Registered: 2014-10-15
Posts: 2

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

OBLiQUE wrote:

There are 2 ways:

ooops... sometimes I tend to forget the KISS way
thanks a lot!!  smile




BTW, if you put down manually the interfaces, hostapd doesn't exit, so create_ap doesn't exit too.

I was killing roll the create_ap script, not hostapd

Offline

#119 2014-10-16 12:32:24

cyberwoodman
Member
Registered: 2012-10-18
Posts: 4

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

I'm curious how can i shape increase or decrease up/down-load network traffic on my software access point? Thanks.

Offline

#120 2014-10-16 12:52:55

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

You can use tc. Check this: https://wiki.archlinux.org/index.php/Ad … ic_control

Last edited by OBLiQUE (2014-10-16 12:53:17)

Offline

#121 2014-10-25 11:11:42

edward.81
Member
Registered: 2014-10-25
Posts: 46

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

I use this script on my raspberry connected to the router.
It work fine but I can't get how to assign the same subnet of my router to wifi device.
My router assign ip like this: 192.168.0.XXX and create_ap assign 192.168.12.XXX
I tried the bridge option and with that i can obtain the same ip of my router, but with that i can't no longer access to my raspberry (ssh, samba, etc)
Some suggestion?

Offline

#122 2014-10-25 11:32:54

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

Lets say you connect your raspberry pi with eth0 and you get the ip 192.168.0.13, then you run the following:

create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase

Then connect to the access point that you created, after that try to ping raspberry (192.168.0.13 in my example). If ping works but you still cannot connect to raspberry's services then the problem is something else (probably the firewall). If you can not even ping the raspberry pi then let me know.

PS: make sure that you have the latest version of create_ap, you can get it from github repository (I have it on the first post)

Offline

#123 2014-10-25 15:59:40

edward.81
Member
Registered: 2014-10-25
Posts: 46

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

OBLiQUE wrote:

Lets say you connect your raspberry pi with eth0 and you get the ip 192.168.0.13, then you run the following:

create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase

Then connect to the access point that you created, after that try to ping raspberry (192.168.0.13 in my example). If ping works but you still cannot connect to raspberry's services then the problem is something else (probably the firewall). If you can not even ping the raspberry pi then let me know.

PS: make sure that you have the latest version of create_ap, you can get it from github repository (I have it on the first post)

Thanks for the answer. I try like you told me (which is the same way I had tried it) and now is working. Go figure.

Offline

#124 2014-11-02 10:04:32

radical0
Member
Registered: 2014-11-02
Posts: 1

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

Can you tell me how to remove the WiFi Access Point that was created in this way

Offline

#125 2014-11-07 11:52:20

OBLiQUE
Member
Registered: 2008-12-04
Posts: 107
Website

Re: [script] create_ap: Create a NATed or Bridged WiFi Access Point

what do you mean by "remove"?

Offline

Board footer

Powered by FluxBB