/srv/irclogs.ubuntu.com/2018/08/18/#ubuntu-server.txt

JgaltHow can i get my wifi card to configure itself and how can I switch between wifi networks at will?03:25
Jgaltyes this is for a server... its a mirror of what i have running at work for our vm host but running on my laptop03:26
sarnoldif you can tolerate installing network manager on the thing, nmcli makes swapping wireless networks pretty easy03:28
tomreynhave you considered network-manager?03:28
Jgaltyes, Id probably prefer network manager..... but ubuntu 18 decided to go its own way and use netplan03:59
sarnoldfor servers, yes04:00
sarnolddesktops still use network-manager04:00
sarnoldfeel free to swap it in if it works for you04:00
Jgaltsarnold: why the split within the same distro?04:01
sarnoldJgalt: because admins would kill us if we put network manager on servers by default04:01
sarnoldJgalt: and users would say ubuntu is hard to use if we had them use netplan for their wifi :)04:01
Jgaltso what was it before all this?  as an admin I tend to like to kill anyone that goes off on their own way with no one else following.  this includes snap, netplan, and likely a few others im not thinking of right now04:04
sarnoldon debian it was /etc/network/interfaces04:04
sarnoldthat was the way it worked on ubuntu server for ages04:05
sarnoldI *think* ubuntu was born after network manager and likely always included it04:05
sarnold/etc/network/interfaces wasn't great fun with wifi04:05
sarnoldI did it04:05
sarnoldbut I think I'm willing to begrudgingly admit that today I'd rather use nm than manage my wifi card via /etc/network/interfaces :)04:06
sarnoldred hat had some system-configure-network python script or similar04:06
sarnoldsuse had yast04:06
Jgaltthat said just before I came on to my current work assignment they chose ubuntu for a couple core servers so I get to manage those until our next upgrade cycle04:06
JgaltI liked /etc/network/interfaces04:07
sarnoldyeah, it *was* simple04:09
Jgaltah well, Try and learn netplan i guess04:09
sarnolda bit too simple.. people expected it to maintain some kind of state04:09
sarnoldso they'd edit the file to make it look the way they'd want, run ifdown.. and it wouldn't tear down the old thing, because it just runs shell scripts.04:10
sarnoldbut it *looked* like it was more than shell scripts.04:10
blackflowsarnold: just a nitpicky correction, netplan is used both on servers and desktops, as it's just a configuration abstraction/wrapper. the difference is in the backend it uses, on desktop it's NM and on servers it's networkd.08:44
blackflowand it's just default, nothing prevents users to flip that around or not use it at all.08:45
=== led_ir23 is now known as led_ir22
fooI still have a production server on Ubuntu 14.04.5 LTS. Has anyone done the upgrade path to Ubuntu 18.04 LTS?14:09
fooOr rather, does that seem scary, and filled with several possible errors? Or is it relatively straightfroward and seamless?14:10
fooIf you're reading in-between the lines: this is a big to do list item and I'm wanting to plan appropriately. :)14:10
fooIt's a digital ocean droplet right now14:10
fooI guess I could easily snapshot stuff and just go for it... worst case, re-write old snapshot14:11
RoyKfoo: it should be rather straight forward - make a backup or snapshot, upgrade to 16.04, test a bit, backup/snapshot again, upgrade to 18.0414:12
RoyKif you have a lot of custom packages and stuff like that, it probably won't be that easy14:13
tomreynit may be wroth considering to do a fresh installation, though, especially if you use OS configuration deployment.14:14
tomreynmuch has changed14:14
fooRoyK: no deb's I've built. Mostly websites, all python/postgres14:14
footomreyn: yes, that's the other option... spin up new droplet on 18.04... and slowly migrate stuff over. I'm open to that too, considering this droplet is many years old. And, well, of course it just "feels better" - ha.14:15
fooWould require changing IPs and cleaning house on a lot of projects... which actually is a bit attractive.14:15
RoyKshould be fairly straight orward, but as tomreyn says - a fresh install and ansible or something to set it up might be a good idea14:15
RoyKfoo: what sort of services do you have on this thing?14:16
fooI'd love some feedback on this: I have a good friend who opened my eyes to docker. I was thinking, instead of one nginx system and various python scripts running, of using docker for every project. Right now I use git locally and push up locally. Difference would be to use docker locally and push up docker containers (still have a lot to learn)... it's a fundamentally different approach, and it sounds a lot cleaner, and security benefits too, and ...14:17
foo... possibly easier to upgrade OS-level stuff too. Do you suggest A) one nginx web server, one web database, various python scripts (eg. as I have now) or do you suggest B) one fairly vanilla system, various docker instances?14:17
fooRoyK: thank you for asking and digging, I've been wanting to think through this for a while. I have had many things... php + mysql for many many years, I recently shut down all that stuff and only use python + postgres + various python scripts (eg. one python script powers a chatbot)14:18
fooThat's mostly it. /me scratches head14:18
foonginx + gunicorn + django sites and a few static sites14:18
fooVarious cron jobs, often calling python scripts14:18
RoyKsounds like a pretty normal webserver to me14:19
fooYup14:19
* foo curious if anyone here is a fan of option A or B, too - if familiar with docker setup like this14:20
RoyKfoo: I guess setting up a new one may streamline installation a bit - I mean - get a new vm with u1804, setup ssh keys, use ansible (or whatever you prefer) for everything else14:20
RoyKso that next time you need a reinstall, it's done in record time14:21
fooRoyK: yeah, I'm leaning towards that. Not familiar with ansible, if I did that, I'd likely rsync some stuff over14:21
* foo googles ansible14:21
RoyKfoo: just keep the old server running until the new one seems good - then switch - keep the old one for a week or so in case you need to go back14:21
fooLooks like this system is 4 years old (granted, I've been actively updating it)14:22
fooRoyK: thanks, I like it! I also had a very old PHP drupal site on here, with mysql, which was likely very vulnerable... so re-installing is also attractive for this reason14:23
RoyKsounds like it14:23
fooRoyK: happen to have any thoughts on new system being A) one nginx instance, one postgres database, everything connects to it (like I currently have it) or B) a bunch of docker instances?14:23
RoyKdrupal is rather well known for its bugs14:23
RoyKisolation is good, although I'm not really into docker - still using kvm14:25
fooRoyK: aha, thanks! yeah, I left drupal and php a few years ago... python has been fun. :)14:25
* RoyK also thinks it's a good idea to use postgres over mysql/mariadb, but it seems we already agree on that14:27
fooRoyK: :) Really appreciate you sharing your thoughts, thank you!14:28
RoyKnp :)14:29
fooRoyK: also looks like EOF on 14.04.5 LTS is April 2019, so I technically still have some time. I thought it was last month for some reason14:31
RoyK5 years for LTS14:32
RoyKand 14.04 was released - guess! in 2014-0414:32
foo:)14:34
foothanks!14:34
RoyKfoo: there are several systems like ansible (chef, puppet, cfengine etc etc etc), but I somehow like ansible - it's not perfect, but it doesn't require a client/agent, it all runs over ssh, which is convenient14:36
fooRoyK: ohhh, ansible falls in the chef category. I haven't ever had a need for that level of automation, but I hear it's awesome when you're wanting to command an army of systems. Got it!14:37
RoyKthen migrating a webserver to a new one would be a nice way to learn one of those tools :)14:38
fooRoyK: do those tools, even ansible, make sense for 1 server - though?14:45
RoyKfoo: with ansible it really doesn't matter if it's one or a thouosand - you just give it a playbook, referincing a hostfile and there you go14:53
fooRoyK: aha, I see14:53
RoyKso when the server dies or you want to host it somewhere else, just setup a new one with the playbook, move relevant data and you're go14:54
fooRoyK: I suspect playbook is "run these scripts, install these packages, set these configs" - etc?14:55
RoyKyes14:55
RoyKthere are fairly good documentation on https://www.ansible.com/14:55
fooRoyK: thank you! I might just give this a look. It would be nice to have a failover system one day and it sounds like this could help with that14:59
fooactually, with digital ocean, I could probably take a snapshot and clone the system and move it to another zone or something... maybe. :) And even if not, having a local dev environment set up same as production... that could be another good use case14:59
RoyKyep15:00
RoyKjust write a good playbook, then deploying the machine somewhere else is easy15:00
fooRoyK: thank you!15:05
fooRoyK: making a note of this and planning this out on calendar15:05
Checkmatehello guys its possible to use ufw or iptables to block limit of request per ip at a script file script.sh ?17:46
blackflowCheckmate: what kind of request?18:41
Checkmateblackflow http requests18:42
blackflowCheckmate: no, iptables have no concept of a http request. you can only limit at packet level, eg. new connections by limiting SYN packets18:43
blackflowbut the web server should be able to do that. nginx and apache can, at least18:43
Checkmateblackflow and fail2ban?18:43
blackflowCheckmate: no, the only thing that understands the concept of a "http request" in order to throttle it, is the web server18:45
blackflowCheckmate: perhaps avoid the XY problem and state what exactly are you trying to solve?18:45
Checkmatei want block bots18:46
blackflowCheckmate: that's a game of whack-a-mole which you can never win.18:47
blackflowyou can also throttle "good" bots with robots.txt18:47
Checkmateyou're right i can never win only by cloudflare mode i'm under attack18:54
Checkmateblackflow iptable or ufw can be used for a specified script.sh ??18:57
blackflowCheckmate: I have no idea what "specific script.sh" is19:02
blackflow*specified19:02
blackflowbtw not sure even cloud flare can help with bots. what problem are you having? excessive traffic?19:03
=== whislock_ is now known as whislock

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!