OpenWRT 18.06.9 Cannot update list + can't install wireguard* packages - router

I cannot install Wireguard (and the dependecies, mips_24kc packages) to TP-link TL-WR740N with OpenWRT 18.04.9. I have connected wirelessly as WAN connection ('Client mode' wireless), so I can connect to Internet.
I tried to the update list, because i searching wireguard* pacakges, but I got this message: https://fos.hu/10mj
I tried manually install these packages:
https://downloads.openwrt.org/releases/18.06.9/packages/mips_24kc/base/wireguard_1.0.20200611-1_mips_24kc.ipk
https://downloads.openwrt.org/releases/18.06.9/packages/mips_24kc/base/wireguard-tools_1.0.20191226-1_mips_24kc.ipk
I got this message:
Collected errors: * wfopen:
https://downloads.openwrt.org/releases/18.06.9/packages/mips_24kc/base/wireguard-tools_1.0.20191226-1_mips_24kc.ipk:
No such file or directory. * pkg_init_from_file: Failed to extract
control file from
https://downloads.openwrt.org/releases/18.06.9/packages/mips_24kc/base/wireguard-tools_1.0.20191226-1_mips_24kc.ipk.
While wrote this wiki about wireguard for 18.06.X: https://openwrt.org/packages/pkgdata_owrt18_6/wireguard, no have links.
I must have install Wireguard packages, because i must have this device as wireguard vpn client.

Related

raspberry pi openvpn: ERROR: Cannot open TUN/TAP

I'm getting the above error when trying to connect to vpn given a .ovpn file. Usually this bug happens after an upgrade occurs and you haven't restarted yet. But I already did and the error still exists. I have tried reinstalling the openvpn (I'm using 2.4.7 on debian) and would not like to use this on docker.
Since getting this error when executing the command sudo openvpn file.ovpn often returns vague errors such as the one above, you can produce a more specific error when trying to import the ovpn file into NetworkManager instead.
After installing network-manager of course:
nmcli con import type openvpn vpn file.ovpn
Connect to the profile:
nmcli con up id vpn
Running this command would immediately show you a clearer error that is something along the lines of the org freedesktop networkmanager vpn plugin being unknown. Which is then solvable by installing the said plugin.
sudo apt install network-manager-openvpn
And that should do it.

amazon linux on premise: yum update fails

I Just installed amazon linux on my windows 10 hypervisor using aws provided image from amazon. I am able to login successfully. However when I do yum install anything it just fails with error "Could not resolve host: cdn.amazonlinux.com". Following is the full snippet
[root#cloudimg yum]# yum install curl
Loaded plugins: langpacks, priorities, update-motd
https://cdn.amazonlinux.com/2/core/2.0/x86_64/f5ab60d117aab318ddc588ab7dbac074cc20ddf36a924287c55fbd593496ae79/repodata/repomd.xml?instance_id=fail&region=URLError: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
amzn2extra-docker/2/x86_64/pri FAILED
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/primary.sqlite.gz: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/primary.sqlite.gz: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
Trying other mirror.
One of the configured repositories failed (Amazon Extras repo for docker),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=amzn2extra-docker ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable amzn2extra-docker
or
subscription-manager repos --disable=amzn2extra-docker
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=amzn2extra-docker.skip_if_unavailable=true
failure: repodata/primary.sqlite.gz from amzn2extra-docker: [Errno 256] No more mirrors to try.
https://cdn.amazonlinux.com/2/extras/docker/18.09.9/x86_64/6f06d82b5b1fa3d35af7a537bd9f3fa1d95d238361558bbb1e6a47c219c3adb2/repodata/primary.sqlite.gz: [Errno 14] curl#6 - "Could not resolve host: cdn.amazonlinux.com"
[root#cloudimg yum]#
I have tried pinging cdn.amazonlinux.com and it works just fine. Looking at the attempted URL it looks like passed instance_id and region are wrong. They may have worked within aws but with on premises install they wouldn't have any value. I have no clue where to set default values for these parameters which are attempted by yum.
Any pointer to solve this problem will be much appreciated. My need is to try something on aws linux on my local system before I plan anything on AWS itself. Local development R&D on my laptop hosted aws linux image is much faster for my needs.
Unfortunately this isn't an answer, but I don't have enough reputation in order to comment. (unintended consequences, stackoverflow)
Although you can ping the cdn.amazonlinux.com address, I don't think you can access files there without authentication. If you access any path, you'll get an XML message that states "Access Denied" which is probably not well displayed as a part of the yum tool output.
I have been doing a bit of digging around for the publicly available package repo address for amazon linux packages so I can run a VM on my computer, but have not found a resolution. Amazon doesn't seem to make this available and nobody seems to be mirroring it externally.
Tons of search results for "adding a repo to your amazon linux instance" including EPEL and others, but no results for anyone saying "Add the Amazon Linux repo to your on-prem or outside-of-aws vm"

Yarn: Error: connect ECONNREFUSED 127.0.0.1:443

When I install ELM via yarn, I get
-- ERROR -----------------------------------------------------------------------
Something went wrong while fetching the following URL:
https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz
It is saying:
Error: connect ECONNREFUSED 127.0.0.1:443
NOTE: You can avoid npm entirely by downloading directly from:
https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz
When I manually browse to https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz. I get
However other people can access the link and it downloads the file.
EDIT:
HOSTS File:
127.0.0.1 view-localhost # view localhost server
127.0.0.1 mydevsnapcap.com www.mydevsnapcap.com app.mydevsnapcap.com internal.mydevsnapcap.com
0.0.0.1 mssplus.mcafee.com
Edit
This use to work a few days ago.
More tests:
I cannot access it from my phone and pc using my fibre connection, but I can access it on both my phone and mobile using my mobile connection.
It turns out that it was my ISP that was for some reason blocking the link. I switch to using the google dns and all is good in the hood: https://developers.google.com/speed/public-dns/docs/using
Something in your computer or on your network is resolving the domain github.com to 127.0.0.1, i.e. localhost. Hence, everytime you attempt this access, it tries to reach a service running on the very same computer you're making the request from.
Check your DNS settings.
Check that there are no entries for github.com in the hosts file (on Windows C:\Windows\System32\drivers\etc\hosts, everywhere else /etc/hosts).
If you're running something like Pi-Hole on your network, check, that it doesn't catch github.com

Access guest from virsh

I am running Centos 7 x86-64. I installed a guest (again Centos 7) through kickstart as an exercise. I prepared my kickstart file, I validated it and I launched with virt-install.
If something went wrong with the network configuration (During install I got no problem, I created a local repo on Host FTP server as source for the install) how can I connect to the machine?
Only SSH or virsh foresee some other connection method?
How can I find my machine running network configuration from outside?
I am running a barebone Centos7 installation so only command line, no graphical interface at all.
Thanks,
M.
You can ssh to your physical host from another one having graphical interface with X forwarding enabled (ssh -X machinename), and look at the the VM with virt-manager
You will need X running on the machine you're connecting from. For Mac OS it's XQuartz

Resolve hostnames with arch linux on a RaspberryPi

I have a Pi that runs hostapd and dhcpd on arch linux to create it's own land with the Pi's (routers) IP being 10.0.0.1. This uses the wlan0 interface and it only serves as a standalone router running a web server.
Once I connect to the Pi, I use 10.0.0.1 to display the web pages, but I want to use a hostname such as firepi. I have tried using dnsmasq, but I haven't been successful. Any help would be greatly appreciated especially if you can give me some detailed examples as I am a novice.
The purpose of this system is that I have created a web app that you can use to ignite fireworks over WiFi at a safe distance. I would just like the convenience of using a hostname instead of the IP address.
I must add that I will more than likely be using an iPhone to connect to the server, should this affect anything.
Not too sure how or why but this is what I did and it is successfully working now, so this is just for future users who may need a similar setup to mine.
First I installed hostapd and dhcpd and made sure they were working. Next I changed '/etc/hostname' to firepi and the '/etc/hosts' and added '10.0.0.1 firepi'. Then I installed dnsmasq, and set the interface to wlan0, and finally added '10.0.0.1 firepi' to '/etc/resolv.conf'.
After a full reboot, I joined the network on my iPhone, navigated to firepi and sure enough, it worked!
Thanks to the other users for their advice and tips.
You can use avahi on Arch as well to resolve your hostname:
sudo pacman -S avahi nss-mdns
Start the avahi daemon:
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service
Edit /etc/nsswitch.conf
sudo vim /etc/nsswitch.conf
Change the line:
hosts: files myhostname dns
to
hosts: files myhostname mdns_minimal [NOTFOUND=return] dns
Reboot
Note: don't forget to add .local to your hostname.
See also:
http://blog.pixxis.be/post/77285636682/resolve-hostname-with-arch-linux-on-a-raspberry-pi
If you just want to be able to use "firepi" as hostname to connect to it, you can simply add it to your /etc/hosts file using the syntax "IP host".
To make it as easy as possible, run this command as root:
echo "10.0.0.1 firepi" >> /etc/hosts
That'll do the trick.
Can you try avahi ?
sudo apt-get install avahi-daemon and
sudo apt-get install avahi-browse
I've successfully used that on Raspian. Unless you change the hostname using
sudo raspi-config you will access via raspberrypi.local
Note that if you plan to access the RPi from Windows you will need to install Bonjour Service first(if you have iTunes intalled, you might have those, run services.msc and check if the Bonjour Service is started)
Another note: On a friend's iphone I've installed a generic vnc client and had x11vnc running on the RPi and succesfully managed to connect to the RPi (since avahi-daemon was installed)