Ubuntu: Created AP/Hotspot does not show up on any device. Made using shell script



Question:

I have a shell script that's supposed to create an access point for me for further use. And before anyone else tells me i should use something like hostapad,please refrain yourselves from doing that. I need to use this one as it is for a school project. The script goes like this

ifeth=" "  ipeth=" "  masketh=" "    ifwifi=" "  ipwifi=" "  maskwifi=" "    router= " "  ssid= " "  

Then stop the network manager, ethernet settings

ifconfig $ifeth down  ifconfig $ifeth up  ifconfig $ifeth $ipeth netmask $masketh  

wifi settings

iwconfig $ifwifi down  iwconfig $ifwifi essid $ssid mode managed channel auto txpower auto ap auto  ifconfig $ifwifi up  iwconfig $ifwifi rate auto  ifconfig $ifwifi $ipwifi netmask $maskwifi    exit 0  

I would be grateful if anyone can offer any insight on how to make this work. Also,any extra details or explanations would be much welcome and quite appreciated. And also,i didn't set a password yet as my goal is to get it up and running. It can be customised after that.And one last thing , between the qoutes there are my local variables so no point in getting them in here too. To be mentioned that i'm using ubuntu 16.04

Apologies for being out for so long. Visited my grandparents as a had an extended weekend. According to your suggestions i'm going to keep editing this one if there is any more info to add. Anyway,below is the output of the script.

+ ifeth=enp0s25  + ipeth=10.10.10.101  + masketh=255.255.255.0  + ifwifi=wlp16s0  + ipwifi=10.20.30.1  + maskwifi=255.255.255.0  + router=ruter1  + ssid=universitate  + /etc/init.d/network-manager stop  [ ok ] Stopping network-manager (via systemctl): network-manager.service.  + ifconfig enp0s25 down  + ifconfig enp0s25 up  + ifconfig enp0s25 10.10.10.101 netmask 255.255.255.0  + ifconfig wlp16s0 down  + iwconfig wlp16s0 essid universitate mode Managed channel auto txpower auto   ap auto  + ifconfig wlp16s0 up  + iw wlp16s0 set bitrates legacy-2.4 54  + iwconfig wlp16s0 rate auto  + ifconfig wlp16s0 10.20.30.1 netmask 255.255.255.0  + exit 0  

As for what it's supposed to do,i want it to make an access point that i can the use for connecting to the internet with another device(eg. my phone). I want an access point and not a hot-spot as i will need to log all the activity done through it. Also,as it can be seen here,my variables are simple(no need to use " "),and there aren't any errors(or at least i can't see any). The problem is that this access point simply doesn't show up anywhere,even scanning the network with another laptop doesn't seem to find it. And thanks a lot for your ideas till now!


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »