QUIC traffic generation - networking

I wanted to know if anyone in this community know/found a way to simulate QUIC traffic profile. For analyzing/simulating youtube over WLAN (WiFi), i wanted to know if there is a convenient package like iperf out there.
Thanks
Bharat C P

At the moment there are not any simulation frameworks that can be used to test QUIC traffic.
However there is a remarkable effort in order to provide stand alone implementations with the aim of testing and analyzing QUIC.
I cite just some references you might want to use to this purpose:
Official Google Guide which contains a sample server and client implementation in Chromium.
libquic a library extracted from Chromium's QUIC Implementation
quic-go is an implementation of the QUIC protocol in Go.

I was able to generate QUIC traffic using aioquic. I'm using KDE Neon, which is an Ubuntu derivative.
git clone https://github.com/aiortc/aioquic.git
sudo apt install libssl-dev python3-dev
virtualenv venv1
source venv1/bin/activate
cd aioquic/
pip install -e .
pip install asgiref dnslib httpbin starlette "werkzeug<2.1" wsproto
Then, in one terminal, run the server:
python examples/http3_server.py --certificate tests/ssl_cert.pem --private-key tests/ssl_key.pem
And in another, make an http3 request with the client:
python examples/http3_client.py --ca-certs tests/pycacert.pem https://localhost:4433/
Done.
You can see the traffic in Wireshark. The version that worked for me was 3.6.5. Note that you would need to sniff the loopback interface (Loopback: lo).
Here's how to install Wireshark 3.6.5:
sudo add-apt-repository ppa:wireshark-dev/stable
(need to press enter)
sudo apt update
sudo apt install wireshark

Related

Network manager flickering between device not managed, and no network devices available

Used sudo apt-get upgrade
After reloading the machine, when I hover over the network icon in the top right it flickers between device not managed, and no network devices available.
I changed /etc/NetworkManager/NetworkManager.conf to flip managed to true.
Running ip link will sometimes display wlan0 and will sometimes not, but when it does display wlan0 the number before it increases incrementally.
I can't copy the output due to having no connection on the machine, but after qdisc it has noop state down.
For ifconfig i get the output: wlan0: error fetching interface information: Device not found, and sometimes it does not find the device at all.
A similar output for iwconfig sometimes it will give information about wlan0 and sometimes it will state No such device
tail syslog gives iwlwifi Firmware not running - cannot dump error
ip link set wlan0 up returns either cannot find device or RTNETLINK answers: Input/output error
So first, looking into the dump error lead to this forum:
https://bbs.archlinux.org/viewtopic.php?id=247575
From here it lead to this bug forum: https://bugs.archlinux.org/task/63117
This says to downgrade the version of iwlwifi
Unfortunately, I am not able to downgrade and have it work, maybe someone else could explain that, but another workaround is to reboot, and at the grub menu go onto advanced and pick the previous kernel.
https://www.linuxuprising.com/2018/10/how-to-keep-package-from-updating-in.html
https://www.tecmint.com/remove-old-kernel-in-debian-and-ubuntu/
Now type sudo apt-mark hold firmware-iwlwifi
sudo apt-get upgrade will now say there is no files to update
uname -sr to get the current kernel (the one where the wifi works)
dpkg -l | grep linux-image | awk '{print$2}'
sudo apt remove --purge linux-image
sudo update-grub2
sudo reboot
Now when you boot you should boot into the previous saved kernel
sudo apt-mark showhold -to make sure iwlwifi is still held
sudo apt-get update
sudo apt upgrade
Now when you reboot you should have the updates without the new iwlwifi which has the bug
If I am wrong please correct me, this came from my own personal issue with the upgrade and this is how I fixed it for me, so if there is a much easier way please let those that come across this know

Cisco VPN client on Ubuntu 16.04 LTS

I am trying to install Cisco VPN Client on Ubuntu, but I am facing problems.
So How can I install it on Ubuntu 16.04 LTS ?
Run
sudo apt-get install network-manager-vpnc network-manager-vpnc-gnome
Then open network manager and add a new VPN, it should show Cisco Compatible VPN in your list now.
I was using the Cisco AnyConnect Client for Linux during the last months, which was in general working, but had a few major bugs.
Most important: whenever you disconnected (also by just switching to another network), you would have to completely restart the computer to make the VPN work again.
I now switched to the open source client called OpenConnect, which is compatible with Cisco's AnyConnect SSL VPN but just works a lot more reliable. To install and enable the VPN, have a look at this: https://people.eng.unimelb.edu.au/lucasjb/oc.html
Edit: just saw that OpenConnect was already proposed in a comment. Leave this answer here as it provides some additional information and a step-by-step manual
OpenConnect offers an opensource command line alternative to Cisco's GUI:
echo "password" | sudo openconnect server --user=username --passwd-on-stdin
See here for more details/source I blatantly stole this answer from: https://askubuntu.com/questions/1043024/how-to-run-openconnect-with-username-and-password-in-a-line-in-the-terminal
Install info here: http://ubuntuhandbook.org/index.php/2014/11/connect-cisco-anyconnect-vpn-ubuntu/
First run command below to active the TUN module (I didn't need this in Ubuntu 18.04.3 LTS):
sudo /sbin/modprobe tun
Install OpenConnect:
sudo apt-get install openconnect
Run command above or:
sudo openconnect SERVERADDR

Something missing in configuration for publishing from VS to Docker on Ubuntu?

I want to publish my projects from Visual Studio to Docker service on my own server. So there are some questions rising:
1) Install Docker on Ubuntu - plenty of manuals, for example: http://blog.tonysneed.com/2015/05/25/develop-and-deploy-asp-net-5-apps-to-docker-on-linux/
For me it ends (I think) at the point he going do "dockerize" something, but okay, at least I have the Docker installed.
2) Somehow find a way to publish VS projects to Docker. Again, plenty of manuals: http://www.hanselman.com/blog/PublishingAnASPNET5AppToDockerOnLinuxWithVisualStudio.aspx
3) And the problem is when I finally choose "Publish", specifying connection and other stuff, it fails checking connection. So, Docker out of the box isn't ready to receive deployments from VS? What do I need to fill the gap?
Edit for some details:
Docker was installed with these exact commands with no further configuration:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys
36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
What I'm deploying is ASP.NET 5 beta 7 app, specifying:
URL: tcp://19.85.23.13:2376
Image: microsoft/aspnet
And leaving other parameters default. What I get is error:
An error occured during publish. The command [docker -H
tcp://19.85.23.13:2376 build -t microsoft/aspnet -f
"C:\Users\adski\AppData\Local\Temp\PublishTemp\DockTest185\approot\src\DockTest1\Dockerfile"
"C:\Users\adski\AppData\Local\Temp\PublishTemp\DockTest185"] exited
with code [1]: Post
http://19.85.23.13:2376/v1.20/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=approot%2Fsrc%2FDockTest1%2FDockerfile&memory=0&memswap=0&rm=1&t=microsoft%2Faspnet&ulimits=null:
dial tcp 19.85.23.13:2376: ConnectEx tcp: No connection could be made
because the target machine actively refused it..
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
Please visit http://go.microsoft.com/fwlink/?LinkID=529706 for
troubleshooting guide.
Well I'm not really a web-security expert. I've found this yet another manual: http://sheerun.net/2014/05/17/remote-access-to-docker-with-tls/ but can't really understand if it is what I need. After all, nobody in those "Visual Studio Publish to Docker" guides mentioned I need a certificate or something.
But obviously I need some credentials to access my server, otherwise, if it is on the web, anyone could dock something in it. And what are those cursed credentials? Any guides for dummies?
Edit 2: found something that looks like relevant: https://docs.docker.com/articles/https/
Er, is this really that complicated? But goddamit, none of those asp.net/docker tutorials mentioned that. Guides for dummies, pleeease?

curl can't connect to only certain HTTPS hosts

I am trying to install Meteor.js on a VM (Ubuntu 12.04) created with Vagrant.
The install should be as simple as:
curl https://install.meteor.com | /bin/sh
However this fails with curl: (7) couldn't connect to host
I have isolated the failure to a request within that shell script to this URL:
https://warehouse.meteor.com/bootstrap/0.7.0.1/meteor-bootstrap-Linux_i686.tar.gz
When I changed it to use HTTP instead of HTTPS it works. However I am running into problems elsewhere where it needs to pull things from httpS://warehouse.meteor.com/...
I thought the problem was with https, but if I do:
curl https://google.com
I get the page no problem, so what could be the issue?
Per another Ubuntu/Meteor question, it appears that there's some kind of certificate error (Meteor's SSL CA may not be installed by default in Ubuntu?) that goes away when you:
sudo apt-get update && sudo apt-get upgrade
For me upgrade didn't solve the problem.
My solution was to download the script from install.meteor.com and replace TARBALL_URL from https to http and I ran the script manually.

simple and quick tool on linux to watch a http request coming

A HTTP request is coming your way, hitting your machine on a port( assumed that you know the request url/route and the port)
what is a simple and quick tool which helps you watch its headers, parameters being passed, using any language, or any tiny web server proxy, any tool.
Being a ruby/rails guy, I quickly created a rails app, set its routes, ran it, and simply followed its logs.
Curious to know how other web app developers deal with this.
I use WireShark and it is very easy and configurable.
If you use debian or derivates:
sudo apt-get install wireshark
else:
http://www.wireshark.org/docs/wsug_html_chunked/ChapterBuildInstall.html
I'd do this with tcpdump. See the man page. There is also a version for windows.
edit
here's the requested example: tcpdump port 80 (yes, it's that simple). Run it with sudo or as root, otherwise you'll get no suitable device found.
If you need more verbose output, add -v or -vv.
Here is how to use wireshark on a Debian-derived GNU/Linux distro:
$ sudo apt-get install wireshark wireshark-doc
$ sudo dumpcap -i eth0
Ctrl+C
$ sudo chmod 644 /tmp/wireshark_pcapng_eth0...
$ wireshark /tmp/wireshark_pcapng_eth0...

Resources