john9527
Part of the Furniture
That's what I first thought as well, but the endpoint appears to be an index as well, not a length.I'll double check but I think it's a length/index thing.
That's what I first thought as well, but the endpoint appears to be an index as well, not a length.I'll double check but I think it's a length/index thing.
I've just thrown a few strings and they seem to break at the right place. I think the first number is the index to start, and the second is the length of the string to extract.That's what I first thought as well, but the endpoint appears to be an index as well, not a length.
1) In the terminal like the install script. Copy and paste version below:Code:/jffs/scripts/YazFi
2) I'd recommend 192.168.3.1 in your case, i.e. the next subnet up. It can be any subnet you like, my script checks to make sure the selected subnet isn't already in use on the router.
And indeed! I'm toying with the idea of "auto-configuration", so you just set 1 thing and the script sets the rest.
************@RT-AC68U-ADE8:/tmp/home/root# /jffs/scripts/YazFi
YazFi: YazFi v1.1.1 starting up
YazFi: wl01_IPADDR setting last octet to 0
YazFi: wl0.1 passed validation
YazFi: firewall-start doesn't exist, creating
YazFi: wl0.1 (SSID: Telus 2.4) - VPN redirection enabled, sending all interface internet traffic over VPN Client 2
YazFi: VPNCLIENT2 clientlist has changed, restarting
YazFi: DHCP configuration updated
YazFi: YazFi v1.1.1 completed successfully
************@RT-AC68U-ADE8:/tmp/home/root#
All looks good so connect a device to the network and check it shows your VPN IP. If all good I will add the AC68U as confirmed working to the list.No, doesn't have to be automatic, am learning! I really appreciate your script and your assistance - thank you!Code:************@RT-AC68U-ADE8:/tmp/home/root# /jffs/scripts/YazFi YazFi: YazFi v1.1.1 starting up YazFi: wl01_IPADDR setting last octet to 0 YazFi: wl0.1 passed validation YazFi: firewall-start doesn't exist, creating YazFi: wl0.1 (SSID: Telus 2.4) - VPN redirection enabled, sending all interface internet traffic over VPN Client 2 YazFi: VPNCLIENT2 clientlist has changed, restarting YazFi: DHCP configuration updated YazFi: YazFi v1.1.1 completed successfully ************@RT-AC68U-ADE8:/tmp/home/root#
The second parameter should be a lengthI've just thrown a few strings and they seem to break at the right place. I think the first number is the index to start, and the second is the length of the string to extract.
I could be wrong but it seems to be working on my AC87U terminal!
${stringosition} and ${stringosition:length}
"string" specifies our variable name and the "position" is our starting point to extract information from. We can fine tune this further by using the "length" parameter. When length is used with position this means display information starting at position x for a length of y.
Now I do believe you're right on that, I got myself confused between length and index halfway through. I'll patch it in the next version.The second parameter should be a length
So I think that the second parm should always be 255
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/YazFi/master/YazFi" -o "/jffs/scripts/YazFi" && chmod 0755 /jffs/scripts/YazFi && /jffs/scripts/YazFi
All looks good so connect a device to the network and check it shows your VPN IP. If all good I will add the AC68U as confirmed working to the list.
If not, I will do my best to get it all working for you!
###### 2.4 GHz Networks ######
####################################################################
###### Guest Network 1 (wl0.1) #####
####################################################################
wl01_ENABLED=true
wl01_IPADDR=.0
wl01_DHCPSTART=2
wl01_DHCPEND=254
wl01_DNS1=162.242.211.137
wl01_DNS2=78.46.223.24
wl01_REDIRECTALLTOVPN=true
wl01_VPNCLIENTNUMBER=2
####################################################################
What IP are you entering in _IPADDR? I can do a TeamViewer session with you now if you'd like?Not working for me yet - Client 3 is set to US server, Client 2 set to Canada - have confirmed both are working correctly. I have both clients set to Start with WAN.Code:###### 2.4 GHz Networks ###### #################################################################### ###### Guest Network 1 (wl0.1) ##### #################################################################### wl01_ENABLED=true wl01_IPADDR=.0 wl01_DHCPSTART=2 wl01_DHCPEND=254 wl01_DNS1=162.242.211.137 wl01_DNS2=78.46.223.24 wl01_REDIRECTALLTOVPN=true wl01_VPNCLIENTNUMBER=2 ####################################################################
I have no internet on 2.4 guest network and internet on US server on regular network.
After setting config file, save, reopened & confirmed that settings have stuck. After running script, I revisit the config file and find wl01_IPADDR setting changes to .0 every time.
DNS settings are Nord VPN DNS servers.
I am entering 192.168.3.1What IP are you entering in _IPADDR? I can do a TeamViewer session with you now if you'd like?
Sure. PM me the relevant details for the session and I'll join.I am entering 192.168.3.1
TeamViewer session would be good if you have time.
Hmmm.....was hoping it was just a web-based thing, TeamViewer not in repositories for Ubuntu.....can we troubleshoot another way?Sure. PM me the relevant details for the session and I'll join.
I think I've spotted the code error, patching and testing now!Hmmm.....was hoping it was just a web-based thing, TeamViewer not in repositories for Ubuntu.....can we troubleshoot another way?
v1.2.1 should fix this.Hmmm.....was hoping it was just a web-based thing, TeamViewer not in repositories for Ubuntu.....can we troubleshoot another way?
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/YazFi/master/YazFi" -o "/jffs/scripts/YazFi" && chmod 0755 /jffs/scripts/YazFi && /jffs/scripts/YazFi
No problem at all, really appreciate your time. Policy Route entries are something I would have had to change over and above the installation & setup of your script correct?v1.2.1 should fix this.
Code:/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/YazFi/master/YazFi" -o "/jffs/scripts/YazFi" && chmod 0755 /jffs/scripts/YazFi && /jffs/scripts/YazFi
Please make sure you have removed any Policy Route entries for the guest SSID so that the updated scripts can re-create them in the new way.
EDIT: Sorry for the added complication for a new user, the Policy Routing change was necessary to make the clean-up more robust
***********@RT-AC68U-ADE8:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/YazFi/master/YazFi" -o "/jffs/scripts/Yaz
Fi" && chmod 0755 /jffs/scripts/YazFi && /jffs/scripts/YazFi
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 19732 100 19732 0 0 19732 0 0:00:01 --:--:-- 0:00:01 30033
YazFi: YazFi v1.2.1 starting up
YazFi: wl01_IPADDR - .0 - is not a valid IPv4 address, valid format is 1.2.3.4
YazFi: VPN Client 2 is not configured for Policy Routing
YazFi: wl0.1 failed validation
***********@RT-AC68U-ADE8:/tmp/home/root#
YazFi: wl01_IPADDR - .0 - is not a valid IPv4 address, valid format is 1.2.3.4
YazFi: VPN Client 2 is not configured for Policy Routing
I thought I had to reinstall new script, that is what I got when I attempted to do so.You'll need to put your actual IP (192.168.3.1) in the config file (it will be kept now and not replaced by just .0)
Can you confirm the setting you have for Redirect Internet traffic for VPN Client 2 please?
**********@RT-AC68U-ADE8:/tmp/home/root# /jffs/scripts
-sh: /jffs/scripts: Permission denied
***********@RT-AC68U-ADE8:/tmp/home/root# /jffs/scripts/YazFi
YazFi: YazFi v1.2.1 starting up
YazFi: VPN Client 2 is not configured for Policy Routing
YazFi: wl0.1 failed validation
meinertac68U@RT-AC68U-ADE8:/tmp/home/root#
Click VPN on the left hand menu (Advanced Settings section), then VPN Client tab, select your client instance (top dropdown, Client 2 for this case), then near the bottom of the page will be the setting.I thought I had to reinstall new script, that is what I got when I attempted to do so.
I changed IP, saved & ran script anyway, this is what I got:
Where do I find Redirect Internet traffic in router interface?Code:**********@RT-AC68U-ADE8:/tmp/home/root# /jffs/scripts -sh: /jffs/scripts: Permission denied ***********@RT-AC68U-ADE8:/tmp/home/root# /jffs/scripts/YazFi YazFi: YazFi v1.2.1 starting up YazFi: VPN Client 2 is not configured for Policy Routing YazFi: wl0.1 failed validation meinertac68U@RT-AC68U-ADE8:/tmp/home/root#
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!