Wikipedia:Reference desk/Archives/Computing/2020 May 15
Computing desk | ||
---|---|---|
< May 14 | << Apr | May | Jun >> | May 16 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
May 15
[edit]ssh automatically trigger vpn
[edit]Asked on StackOverflow, got no response. Maybe someone here knows this. I have an IP address I use a few times a week that requires a connection to a VPN. In my .ssh/config, I have set it up to automatically use the correct username and certificate. Is it possible to tell it to automatically connect the VPN as well? Right now, I ssh to the IP address, wait, no connect, damn, kill it, connect vpn, ssh again. 97.82.165.112 (talk) 12:22, 15 May 2020 (UTC)
- Okay, so you need your system to create the VPN connection in order to connect to the IP address? The easiest way to do this is going to be an alias or a script. Can you make something like that in bash? What OS are you using? Does the VPN require manual input of username/password? Elizium23 (talk) 12:25, 15 May 2020 (UTC)
- I am using RHEL7. I don't know how to start the VPN from the command line. It is configured in the gnome network connections. I have to click the network icon, click vpn, click the VPN connection. I think I'm really just looking for how to connect to OpenVPN using command line. I haven't found anything like that. 97.82.165.112 (talk) 13:20, 15 May 2020 (UTC)
- Try
nmcli conn up <name>
and tab completion will work there too. Elizium23 (talk) 13:22, 15 May 2020 (UTC)- I haven't used that command before. It works, but it returns right away while the vpn takes a few seconds to start. So, tying sleep after it before the proxy command, I think I can get it working. Assuming that works, I'm looking for a way to automatircally execute nmcli conn down after I disconnect the SSH. 97.82.165.112 (talk) 13:50, 15 May 2020 (UTC)
- You can use
nmcli -w
to have nmcli wait for NetworkManager to complete the operation. And placing all this in a simple bash script should be the way to tear down the VPN when you finish as well. Elizium23 (talk) 13:54, 15 May 2020 (UTC)
- You can use
- I haven't used that command before. It works, but it returns right away while the vpn takes a few seconds to start. So, tying sleep after it before the proxy command, I think I can get it working. Assuming that works, I'm looking for a way to automatircally execute nmcli conn down after I disconnect the SSH. 97.82.165.112 (talk) 13:50, 15 May 2020 (UTC)
- Try
- I am using RHEL7. I don't know how to start the VPN from the command line. It is configured in the gnome network connections. I have to click the network icon, click vpn, click the VPN connection. I think I'm really just looking for how to connect to OpenVPN using command line. I haven't found anything like that. 97.82.165.112 (talk) 13:20, 15 May 2020 (UTC)
Why do ip address changes time to time?
[edit]Is there any reason for it? It's general question.
My friend told because of efficiency. But I didn't quite understand .
Basically there are not enough IP addresses to go round everyone who needs one so dynamic IP is used. Your dynamic ip comes as my ip after several days?
I asked this question on several forums but none gave me useful answer. Ram nareshji (talk) 16:36, 15 May 2020 (UTC)
- It depends. If you want a static IP then there are often plans that can be arranged with the ISP. These plans are often business-class service level agreements (SLA). Also, there is IPv6. ISPs might assign ever-changing v6 addresses, and then they may not, because with 128 bits there are enough IPv6 addresses for every grain of sand on the beaches of the Malabar Coast.
- Why do IP addresses change? It depends on network architecture. Most of the time, the ISP runs DHCP servers. The DHCP servers have pools of IP addresses and they dole them out, possibly according to an algorithm, possibly round-robin as you describe.
- What you perceive as your IP address may not be your public IP address. It may be privately assigned, and Carrier-grade NAT is in effect. This is in fact a way to mitigate a lack of IPv4 addresses.
- Why does your IP address change? Ask your ISP. They're the only ones who know this answer. Elizium23 (talk) 17:56, 15 May 2020 (UTC)
- Your friend was basically correct. IPv4, which is what most people are using, only has 4,294,967,296 (232) addresses, and not even all of those are available for use on the public Internet: see IPv4 address exhaustion. There are over 7,000,000,000 humans on Earth and many have more than one computer with Internet capability (personal computer, smartphone, tablet, smart TV, etc.), so this is just simple math. We've papered over this problem with things like network address translation (NAT), but this is not an ideal solution. The "right" solution is to move to IPv6, but doing this is complex and expensive so everybody is dragging their feet on doing this. See dynamic IP address for more on how addresses are often assigned. --47.146.63.87 (talk) 18:32, 15 May 2020 (UTC)
I heard DHCP lease time is up, then our public ip changes, so private ip also changes?
What does dole them out mean? Ram nareshji (talk) 18:56, 15 May 2020 (UTC)
- That is up to your network administrator - the guy who configures the DHCP server.
- "Dole them out" means to ration them according to availability and need. Elizium23 (talk) 18:59, 15 May 2020 (UTC)
- dole out (assuming you're not a native English speaker)
- DHCP leases can be renewed if the DHCP server allows it, so a lease expiring doesn't necessarily mean you'll be assigned a new address. It's all up to the server. They're the boss. If you're behind a NAT, a common scenario, as in many home LANs, is that the different devices on the LAN get assigned "private IP addresses" by a DHCP server running on a device that is also serving as the network gateway and is connected to the public Internet. That gateway device has a "public IP address" assigned by an ISP, and the gateway shares its "public" address with everything on the LAN using NAT. Bigger networks can get a lot more complex so it's hard to give one general answer for all networks. I find this page helpful for touching on some of the misconceptions around IP addresses and interfaces. --47.146.63.87 (talk) 19:20, 15 May 2020 (UTC)
- That link has great information, if you're a seasoned system administrator. Elizium23 (talk) 20:25, 16 May 2020 (UTC)
Vpn doubts
[edit]I saw vpn ip has this details: logging policy is 2 weeks, 104 vpn sessions, cumulative data: 22694 GB. Cumulative users 558,958.
How to understand these details? Does it mention how long vpn stay online ? Ram nareshji (talk) 19:14, 15 May 2020 (UTC)
- The "logging policy" probably refers to for how long the provider keeps user-specific data in the traffic logs and IP address logs. The next are perhaps limits or statistics; in either case, they are meaningless numbers if no time period is specified. Where did you see this? On a web page of the VPN service provider? --Lambiam 19:57, 16 May 2020 (UTC)
I find this information in vpngate site. Ram nareshji (talk) 13:38, 17 May 2020 (UTC)
- If this is about the VPN servers list on webpage https://www.vpngate.net/en/, each entry mentions the uptime of the server in days. So that is the time period. For the entry you mentioned, in that period 558,958 users used that server, transferring altogether 22,694 GB. I am not sure, but suppose the number of sessions is the number of times the service on that server had to be restarted. The purpose of the data is to help users decide which server to connect to. The quality score should suffice. --Lambiam 22:05, 17 May 2020 (UTC)
- I believe the number of sessions is the number of users currently 'connected' to the server. -- zzuuzz (talk) 22:19, 17 May 2020 (UTC)
Options for a home Linux server
[edit]I have a small IT consulting business that I do from home focused on AI and Knowledge Graphs. Mostly I'm more of a modeling, theory kind of person. I build ontologies with the Protege editor and do some basic programming in Python and Java but I've never been good at the admin kind of stuff like setting up servers, running commands from Linux or DOS shells, etc. But for some work I'm doing now it's becoming clear I need a Linux server. I want to use a tool that right now only runs on Linux. My current HP desktop runs Windows 10 Professional. I have a lot of development software on it already and I'm not sure about running Linux on it as well. So this is a very open ended question. Essentially what I'm looking for is the most painless way to get a Linux server running. I don't mind the expense of buying a new machine, however when I looked on Amazon, I didn't see any machines that just come with Linux bundled and I'm afraid I might buy a machine and never get Linux installed on it properly. What recommendations do people have? If I go for buying a new machine, what is the most reliable and easy to use option in terms of machine and software. My understanding is that part of Red Hat's business model is they provide support for people installing Linux but I think that is more for corporate clients and they might be too pricey for me. Or is there a Linux emulator that works really well and that I can run from inside Windows 10? Or is there some other option I should be thinking of? Any and all suggestions (feel free to correct anything I said above that was wrong) are welcome. --MadScientistX11 (talk) 19:51, 15 May 2020 (UTC)
- Funny you should mention Red Hat. There are two or even more options for free-as-in-beer distributions in this vein.
- First there is CentOS. Its release versions are in lockstep with RHEL, and CentOS is basically RHEL with the proprietary and trademark bits scrubbed out. Like RHEL, CentOS is rock-solid stable and tends to be outdated, because each release is supported for a very long time.
- Secondly is Fedora Linux. Fedora is the next best thing to RHEL if you want a super up-to-date modern OS. I run this on my ThinkPad T580. Fedora has a lot of things that work differently from RHEL, because it is in very active development and they change a lot of stuff.
- Scientific Linux is another option, I have no experience with it. Elizium23 (talk) 20:14, 15 May 2020 (UTC)
- Please be aware that Fermilab who develop Scientific Linux are switching to CentOS, and therefore it is unlikely that there will ever be a version 8 of SL. Martin of Sheffield (talk) 22:03, 15 May 2020 (UTC)
- I am not sure that you really want a "Linux server" because you will be doing end-user type things. You just want a Linux workstation that will run the tool you need.
- Ubuntu Linux is a nice choice for desktop use (not server). It's very friendly, it's actively developed by a solid company, and it's well-known by the Linux community so you get things like local user groups. It's based on top of...
- Debian Linux is the granddaddy of Linuxes, which shares many things in common with Ubuntu, but in a more dignified, aloof way. It's easy to install, supports a lot of hardware, and looks mighty goodl. Elizium23 (talk) 20:17, 15 May 2020 (UTC)
- There are companies that sell computers with Linux preinstalled, like System76 and Purism. Depending on your workload, you could also run Linux in a virtual machine such as VMware Workstation or VirtualBox (free). These will run inside Windows 10 and emulate a computer. This does mean you'll have to install Linux in the virtual machine yourself, but you won't have to buy any hardware, or even any software if using VirtualBox. And, as Elizium23 says above, desktop-oriented Linux distributions like Ubuntu and Debian may suit your use better, and are straightforward to set up. codl (talk) 20:35, 15 May 2020 (UTC)
- By all means, run it in a VM, since as you say, it is just one tool you need. You can achieve a fairly seamless experience with Virtualbox or some other respectable hypervisor.
- You will want to have a load of RAM in any machine that runs VMs. I have 8GB and I can run them small. Try 16GB+ for breathing room. Elizium23 (talk) 21:12, 15 May 2020 (UTC)
- Linux is easy to install alongside Windows, assuming you have free space not assigned to a partition (and you can always shrink the Windows partition anyway). I would recommend to go with Debian or Mint. Mint is like Ubuntu but with copyrighted codecs, Debian and Ubuntu are free sofware-only (as in freedom, all Linuxes mentioned here except RHEL are free as in beer too). Another distro that I like to recommend is Q4OS, which is probably the most user-friendly version out there, with Windows-style wizards, but is not as famous as the others mentioned here. The installer will let you dual boot Windows and Linux. IMO it's a bad idea to be dependent on Windows 10 for work, and since all software you mentioned has Linux versions too (and most programs that don't can be emulated with Wine and others) I'd encourage you to give Linux a try. Before installing any Linux distro you should download a live CD version and burn it to a CD or load on a USB and boot into the live environment. That way you can install the programs you need in the temporary environment and see if internet, graphics, your programs etc. works properly on that distro, before you even have to touch the hard drive. 93.136.65.195 (talk) 21:59, 15 May 2020 (UTC)
- Linux and Windows can be installed on the same hard drive, but not on the same partition. It's completely possible to have two partitions on the same hard drive, with Linux on one and Windows on the other. However, as I have heard, you should install Windows first, as Linux recognises a Windows partition and leaves it well enough alone, but Windows treats a Linux partition as corrupted space and wants to reformat it. JIP | Talk 23:02, 15 May 2020 (UTC)
- Well, if the OP has Windows, then quite obviously s/he has installed that first ;) It is correct that Windows should be installed before Linux (and older versions of Windows before newer ones except 7 with 8/10), because Windows tacitly assumes it's the be-all-end-all of your computing options, and if you do it the other way around, you'll have to use a boot recovery tool to be able to boot the previously installed system(s). 93.136.65.195 (talk) 00:02, 16 May 2020 (UTC)
- Linux and Windows can be installed on the same hard drive, but not on the same partition. It's completely possible to have two partitions on the same hard drive, with Linux on one and Windows on the other. However, as I have heard, you should install Windows first, as Linux recognises a Windows partition and leaves it well enough alone, but Windows treats a Linux partition as corrupted space and wants to reformat it. JIP | Talk 23:02, 15 May 2020 (UTC)
The simplest approach is to use a virtual or remote server. No additional hardware cluttering up your house. Where are you located and what specs do you need? In North America try vultr.com high frequency or dedicated cpu instances. In Europe try Hetzner.com dedicated servers (check their auction hetzner.com/sb) or cloud instances. The virtual servers mentioned here are billed by the hour, so you can spin one up, run your thing on it for a few hours, shut it down, and end up getting billed just a few cents or whatever. 2601:648:8202:96B0:3567:50D5:8BFF:4588 (talk) 07:06, 16 May 2020 (UTC)
- This was all really useful, thanks to everyone who contributed. I'm going to save a copy of this somewhere so I can easily access the info in the future when this gets archived. The option I'm going to try first is what the last internet user suggested: there is a virtual server called Docker that is supported by the system I want to use and as Internet User said for someone who doesn't like to spend time configuring things and running shell scripts it seems like both the easiest and cheapest (as in free because I don't need a lot of space) solution. --MadScientistX11 (talk) 15:28, 18 May 2020 (UTC)