NotPike Posted March 25, 2016 Share Posted March 25, 2016 Hi, I didn't see any posts on how to change the WiFi Pineapple IP address on the forum. It took me a while to figure this out so I wanted to make this quick how to for those who don't know how. 1.) Connect to your Pineapple via SSH (Secure Shell) ssh root@172.16.42.1 2.) Edit the network file under /etc/config using vim or nano. nano /etc/config/network 3.) Under config interface 'lan' edit option ipaddr, netmask, and gateway to your settings. (Make sure your ipaddr and gateway are in the same subnet) config interface 'lan' option ifname 'eth0' option type 'bridge' option proto 'static' option ipaddr '10.0.0.1' #172.16.42.1 is default option netmask '255.255.255.0' option gateway '10.0.0.42' #172.16.42.42 is default option dns '8.8.8.8, 8.8.4.4' 5.) Save the file, Reboot your WiFi Pineapple, and Reconnect to it using your brand new IP address. Hope this helps! If there's a better way to do this please let me know. ^_^ Quote Link to comment Share on other sites More sharing options...
phpsystems Posted March 25, 2016 Share Posted March 25, 2016 You might also want to check the dhcp config file too. You might be giving out the wrong dns server and router. 1 Quote Link to comment Share on other sites More sharing options...
NotPike Posted March 25, 2016 Author Share Posted March 25, 2016 You might also want to check the dhcp config file too. You might be giving out the wrong dns server and router. Not sure if this is true or not but it looks like the dhcp file under /etc/config makes a call for 'lan' which I assume is being called from the network file. I'm new to OpenWrt so I'm most likely wrong lol. -=dhcp=- config dhcp lan option interface lan option start 100 option limit 150 option leasetime 12h When I connected to the Pineapple, the DNS seamed to work just fine. I was able to browse the Internet without any problems. I'll test it more and see if I can find anything tomorrow. Quote Link to comment Share on other sites More sharing options...
NotPike Posted March 25, 2016 Author Share Posted March 25, 2016 Okay, so I found some conflicts with some of the modules when I changed the Pineapple's IP. This is only a temp fix and I'll try to find a way to make change with the system's IP address. (I don't know how to code in Java) DWall has the default IP address hard coded in /pineapple/modules/DWall/js/module.js. I just commented out what defined the WebSocket and coped it with the updated IP address. $scope.startWS = (function() { $scope.throbber = true; // $scope.ws = new WebSocket("ws://172.16.42.1:9999/"); $scope.ws = new WebSocket("ws://10.0.0.1:9999/"); $scope.ws.onerror = (function() { $scope.ws.onclose = (function() {}); $scope.startWS(); If there's a better way please let me know. Hope this helps! Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted March 25, 2016 Share Posted March 25, 2016 Okay, so I found some conflicts with some of the modules when I changed the Pineapple's IP. This is only a temp fix and I'll try to find a way to make change with the system's IP address. (I don't know how to code in Java) DWall has the default IP address hard coded in /pineapple/modules/DWall/js/module.js. I just commented out what defined the WebSocket and coped it with the updated IP address. $scope.startWS = (function() { $scope.throbber = true; // $scope.ws = new WebSocket("ws://172.16.42.1:9999/"); $scope.ws = new WebSocket("ws://10.0.0.1:9999/"); $scope.ws.onerror = (function() { $scope.ws.onclose = (function() {}); $scope.startWS(); If there's a better way please let me know. Hope this helps! Oops, I did it out of habit. All you need to do is parse the URL and insert it there. 2 Quote Link to comment Share on other sites More sharing options...
NotPike Posted March 26, 2016 Author Share Posted March 26, 2016 (edited) Oops, I did it out of habit. All you need to do is parse the URL and insert it there. Cool! I'm learning Java on the fly now and I was curious. Is there an easy way to import the value of the IP address of 'br-lan'? IE like a global variable that's normal for OpenWrt systems. Or would you suggest I create a function to pull the IP address from the system or from the config file it's self? Thanks! Edited March 26, 2016 by NotPike Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.