HowTo!!! Verify that your VPN is hooking you up correctly
New netinfo.yad
Hi yafadmin
The new netinfo script does not work correctly in stretchdog 32. The old one works correctly. The new scripts produces a No network status while the old script gives me the public ip.
The new netinfo script does not work correctly in stretchdog 32. The old one works correctly. The new scripts produces a No network status while the old script gives me the public ip.
Re: New netinfo.yad
There is some kind of difference in the output of the network tools between various versions of Linux.gabtech wrote:Hi yafadmin
The new netinfo script does not work correctly in stretchdog 32. The old one works correctly. The new scripts produces a No network status while the old script gives me the public ip.
either the phrase "MULTICAST,UP" or "state UP" should work for the line:
Code: Select all
UpLink=$(ip address show | grep "state UP" -A2 | grep inet|xargs )
UpLink=$(ip address show | grep "MULTICAST,UP" -A2 | grep inet|xargs )
Naturally, this has not been tested with ALL versions of puppy linux. That level of testing is beyond my time and resources ..
As a report, I did try it on Buterdog64 and bionic32. For mi "MULTICAST,UP" does the job.
gabtech Can you post your result in stretchdog 32 to just
gabtech Can you post your result in stretchdog 32 to just
Code: Select all
ip address show
Last edited by enrique on Wed 01 Jan 2020, 23:35, edited 1 time in total.
On my Stretchdog 32 system:either the phrase "MULTICAST,UP" or "state UP" should work for the line:
Code:
UpLink=$(ip address show | grep "state UP" -A2 | grep inet|xargs )
UpLink=$(ip address show | grep "MULTICAST,UP" -A2 | grep inet|xargs )
With ethernet cable plugged in (same output for both):
Code: Select all
root@live:~# ip address show | grep "state UP" -A2 | grep inet|xargs
inet 192.168.1.4/24 brd 192.168.1.255 scope global eth0
root@live:~# ip address show | grep "MULTICAST,UP" -A2 | grep inet|xargs
inet 192.168.1.4/24 brd 192.168.1.255 scope global eth0
root@live:~#
Code: Select all
root@live:~# ip address show | grep "state UP" -A2 | grep inet|xargs
root@live:~# ip address show | grep "MULTICAST,UP" -A2 | grep inet|xargs
inet6 fe80::222:64ff:fe4d:6c17/64 scope link
root@live:~#
Code: Select all
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:22:64:4d:6c:17 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.4/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::222:64ff:fe4d:6c17/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:1b:77:16:3a:10 brd ff:ff:ff:ff:ff:ff
Code: Select all
root@live:~# ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:22:64:4d:6c:17 brd ff:ff:ff:ff:ff:ff
inet6 fe80::222:64ff:fe4d:6c17/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:1b:77:16:3a:10 brd ff:ff:ff:ff:ff:ff
Following up on previous post, IMO, the best way (and portable between different OS's) to check for network connection is to use curl "<some common website>" in this case using "https://duckduckgo.com" , then in the script:
Fred
Code: Select all
### If "$UpLink" is blank we cannot collect info, so exit ..
#if [ -z "$UpLink" ]; then yad --info --timeout=30 --height=100 --width=100 --center --title="Network Status" --text="$(printf "\n\t NO Network\n")" &
# exit 0
#fi
# check if there is network connection using curl, replacing the above commented out
case "$(curl -s --retry-delay 3 --retry 3 --max-time 10 -I https://duckduckgo.com | sed 's/^[^ ]* *\([0-9]\).*/\1/; 1q')" in
[23]) echo "OK, there is network connection, continue..." ;;
*) yad --info --timeout=30 --height=100 --width=100 --center --title="Network Status" --text="$(printf "\n\t NO Network\n")" &
exit 0 ;;
esac
Choice is a fine thing.
Here is a link to a dynamic utility to give an on-screen display.
http://murga-linux.com/puppy/viewtopic. ... 242#978652
(Requires basic conky)
EDIT: 4th January 2020 - Please note that it is not suitable for use with Debian Dogs.
Here is a link to a dynamic utility to give an on-screen display.
http://murga-linux.com/puppy/viewtopic. ... 242#978652
(Requires basic conky)
EDIT: 4th January 2020 - Please note that it is not suitable for use with Debian Dogs.
Last edited by ETP on Sat 04 Jan 2020, 14:17, edited 1 time in total.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]
I am on BusterDog64 and it has Conky as default. I try to manually install but show nothing. One thing is missing "/root/.config/wallpaper/bg_img" where can I find this?
Edit: After doing conkytogle I have NET:EXT: ***.***.*** over IP(wlan0): ###.###.###. But this value never gets updated if I start VPN or STOP?
What I am doing wrong?
Edit: After doing conkytogle I have NET:EXT: ***.***.*** over IP(wlan0): ###.###.###. But this value never gets updated if I start VPN or STOP?
What I am doing wrong?
My version, as a way to say thanks. May this be useful for those who need it.
For this to work, you need "xml2" which "flattens" XML to a line-oriented format (which then you can process with grep/sed/awk/etc). The original source of this small nifty utility has been blown away by time, but fortunately Debian folks keeps a copy for us.
Code: Select all
#!/bin/sh
# Inspiration: http://murga-linux.com/puppy/viewtopic.php?t=117675
TMP=/tmp/ipinfo.$$
cat > $TMP << EOF
Local IP Address(es)
--------------------
$(
ifconfig | sed -n '/^[a-z].*:/ {s/:.*/:/; N; /inet /!d; s/:.*inet /: /; s/[ ]*netmask.*//; H}; ${x;s/^\n//;p}'
)
Remote IP address
-----------------
$(curl -s https://geoip.ubuntu.com/lookup | xml2 | sed 's|/Response/||; s/=/: /')
EOF
[ -z "$DISPLAY" ] && cat "$TMP" ||
Xdialog --fixed-font --title "Network Info" --no-cancel --editbox "$TMP" 0 0 2> /dev/null
rm -f $TMP
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
Hi enrique,enrique wrote:I am on BusterDog64 and it has Conky as default. I try to manually install but show nothing. One thing is missing "/root/.config/wallpaper/bg_img" where can I find this?
Edit: After doing conkytogle I have NET:EXT: ***.***.*** over IP(wlan0): ###.###.###. But this value never gets updated if I start VPN or STOP?
What I am doing wrong?
Sorry my fault, I did not realise that you were using BusterDog64.
The .pet I linked to is only suitable for Pups such as Bionicpup64 8.0
and easyos.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]
No need to say it is your fault. In fact if any, We the DebianDog users are the ones confusing all of you.
We understand that we need to unpack the pets and rebuild as deb packages. Only when there is binaries is when we take things a little more carefully.
Now your pet has only script. and I guess Conky is Conky. Then what would then prevent the updates. It does show correct IP at first. But does not update.
ETP could you at least orient us in Installing to usb and save to sd card. Well I am doing it more as a learning project, but Lucius1202 has a laptop that had broken HDD but has 2 USB and 1 SDCARD. 1 USB is used for Mouse. So he wants to have puppy save in SDCARD. He expect to boot USB - SYSTEM to RAM, then be able to remove USBFLASH so that he can have a spare USB. I guess we need to edit fstab & rc.local to have /dev/mmcblkop1 auto mount. I know you have post on it. Any help appreciated. We wait for you on that thread.
We understand that we need to unpack the pets and rebuild as deb packages. Only when there is binaries is when we take things a little more carefully.
Now your pet has only script. and I guess Conky is Conky. Then what would then prevent the updates. It does show correct IP at first. But does not update.
ETP could you at least orient us in Installing to usb and save to sd card. Well I am doing it more as a learning project, but Lucius1202 has a laptop that had broken HDD but has 2 USB and 1 SDCARD. 1 USB is used for Mouse. So he wants to have puppy save in SDCARD. He expect to boot USB - SYSTEM to RAM, then be able to remove USBFLASH so that he can have a spare USB. I guess we need to edit fstab & rc.local to have /dev/mmcblkop1 auto mount. I know you have post on it. Any help appreciated. We wait for you on that thread.
Hi enrique,
I have edited my previous post to make it clear that the .pet is not suitable for dogs.
The main reason for it not working is that the syntax in the conf file is ancient
(pre 2014) & Conky has moved on since then.
I will endeavour to produce a new version specifically for Dogs & will PM a copy to
you for testing.
With regard to Lucius1202 I gather that his HD checks out ok so will let sleeping
dogs lie.
I have edited my previous post to make it clear that the .pet is not suitable for dogs.
The main reason for it not working is that the syntax in the conf file is ancient
(pre 2014) & Conky has moved on since then.
I will endeavour to produce a new version specifically for Dogs & will PM a copy to
you for testing.
With regard to Lucius1202 I gather that his HD checks out ok so will let sleeping
dogs lie.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]