News for hackers. Stuff that matters.
Re:WireGuard is now in Linus' tree by 3xblah on Tuesday January 28, 2020 @09:57PM (#22176821)
Your home has publicly accessible^1 IP address

Or you are using a third party-controlled server with direct internet access to make home IP accessible

1. No ISP firewall blocking unsolicited incoming traffic

Do you configure WG to use persistent keepalives

Re:WireGuard is now in Linus' tree by braindeath on Tuesday January 28, 2020 @10:02PM (#22176866)
In the US for home connections (cable, fiber, DSL) everybody gets an accessible IP address pretty much -- the worst is that some ports are blocked like port 80 or 25. Phones don't get a dedicated IPv4.
Re:WireGuard is now in Linus' tree by dirkt on Wednesday January 29, 2020 @04:25AM (#22178802)
In other parts of the World that didn't get as many IPv4 addresses as the US, the standard for home connections is that you DON'T get a public IP address, you get a private IP address behind carrier grade NAT

And that's really NAT, not a firewall, so nothing is "blocked".

You do get public IPv6 addresses from some ISPs, though.

Re:WireGuard is now in Linus' tree by 3xblah on Wednesday January 29, 2020 @04:31AM (#22178836)
Finally some truth.
Re:WireGuard is now in Linus' tree by RL_Quine on Tuesday January 28, 2020 @10:41PM (#22177128)
For most people it's dynamic. Mine is dynamic with the PPPoE fibre session.
Re:WireGuard is now in Linus' tree by Polylactic_acid on Tuesday January 28, 2020 @11:36PM (#22177483)
I have a rpi set up with a minutely cron job to update my domain name to point to home. Works pretty well. At the worst you lose connection for a minute but usually the IP address only changes when the home connection fails which can take more than a minute to reset anyway.
Re:WireGuard is now in Linus' tree by core-questions on Wednesday January 29, 2020 @01:29AM (#22178000)
Isn't this what the DynDNS protocol and various daemons are for? Why write your own? :P
Re:WireGuard is now in Linus' tree by input_sh on Wednesday January 29, 2020 @01:42AM (#22178070)
That's precisely how they work. You install a client that pings their server. They see if there's an IP address change and switch the A DNS record.

If your DNS provider has an API, this is probably the very first example in the docs.

Re:WireGuard is now in Linus' tree by gjhr on Wednesday January 29, 2020 @04:08AM (#22178719)
Why not? It is pretty simple and very fun! My first project in golang was a program that polled for the machine's IP address and updated a AWS Route53 record.
Re:WireGuard is now in Linus' tree by canofbars on Wednesday January 29, 2020 @05:04AM (#22179004)
Its not exactly "write your own" I have a single line in my crontab that just uses curl to post to a url and the remote server takes the IP address it got the request from and sets the dns to that.
Re:WireGuard is now in Linus' tree by cbzbc on Wednesday January 29, 2020 @06:33AM (#22179447)
Though usually on firmware like openwrt the request going out is tied to a particular interface going up (and down) as it should be, so its somewhat more robust and 'correct' than crontab would be.
Re:WireGuard is now in Linus' tree by CrazyStat on Tuesday January 28, 2020 @11:14PM (#22177369)
Dynamic in theory, but for many people the IP is unchanged for a long time. I remember reading an article that said the average length of time between dynamic IP changes tracked by some company was something like seven months, though I can't find it now.

I have cable with a theoretically dynamic DNS but it's changed once in >4 years.

Re:WireGuard is now in Linus' tree by 3xblah on Tuesday January 28, 2020 @11:38PM (#22177498)
Can you be sure that during 4yrs it never changed >1 even for a short time, maybe hours or days, then reverted back
Re:WireGuard is now in Linus' tree by marcan_42 on Wednesday January 29, 2020 @12:02AM (#22177612)
That's not really a thing. The pools are large-ish; the chances of winding back on the same IP after a change are tiny.
Re:WireGuard is now in Linus' tree by 3xblah on Wednesday January 29, 2020 @04:37AM (#22178871)
Not speaking for all ISPs worldwide.
Re:WireGuard is now in Linus' tree by 3xblah on Wednesday January 29, 2020 @05:39AM (#22179157)
Maybe running dynamic DNS client that keeps logs of IP address changes. Do DDNS clients keep logs. Maybe passive DNS would detect changes.

The point of the comment was that cannot just assume it never changed unless monitoring it contiuously.

Re:WireGuard is now in Linus' tree by makapuf on Wednesday January 29, 2020 @02:18AM (#22178244)
Well if you don't notice it, for a home vpn, well... you wont notice it.
Re:WireGuard is now in Linus' tree by stjohnswarts on Wednesday January 29, 2020 @11:16AM (#22182137)
You can usually get companies to drop the blocked ports though if you call customer service.
Re:WireGuard is now in Linus' tree by 3xblah on Wednesday January 29, 2020 @03:48AM (#22178628)
"This means you can use it to create inbound network tunnels to computers that don't have a public IP, are behind firewalls or get assigned new IPs frequently."

Sure enough, look what appears on HN front page a few hours later...

https://news.ycombinator.com/item?id=22167627

People's home public IP addresses are not universally reachable/accessible^1 from the internet. It varies.

What does "reachable/accessible" mean. It means that transferring a file would be as easy as person A typing something like

    nc -lnp [port] [person A home IP adddress] < file
and person B typing

    nc -w1 -vvn [person A home IP address] [port] > file
where port is not one that is blocked, e.g., 80, 25, etc. and is known by both persons.

Regardless of what anyone says in an HN comment, in the real world, people at home are sometimes behind firewalls, or other software that performs NAT, that are running on computers that do not belong to them and are not under their control.

That's why WG has persistent keepalives. No one answered that question.

Re:WireGuard is now in Linus' tree by ronnier on Tuesday January 28, 2020 @09:58PM (#22176839)
I have a public IP.
Re:WireGuard is now in Linus' tree by 3xblah on Tuesday January 28, 2020 @10:02PM (#22176869)
A previous thread about WG had some discussion about obtaining a publicly reachable^1 IP address. No doubt many readers are interested

Can you tell us anything about how you obtained one

1. No ISP firewall blocking unsolicited incoming traffic

Re:WireGuard is now in Linus' tree by ronnier on Tuesday January 28, 2020 @10:05PM (#22176889)
I think it's pretty common in the US with the various providers. You get a public IP. I didn't do anything special for that.
Re:WireGuard is now in Linus' tree by zenhack on Tuesday January 28, 2020 @11:08PM (#22177322)
Yeah, I don't think I've ever encountered an ISP in the US that didn't give you a public IP. Maybe they exist?

You only get one, so you typically NAT everything, port 25 is blocked and often port 80 is as well, but that's about it.

Re:WireGuard is now in Linus' tree by EvanAnderson on Tuesday January 28, 2020 @11:31PM (#22177458)
Come to rural western Ohio, where the only non-dial-up options, in some places, are super-high latency satellite and a local "WISP" who NATs their whole Customer base into what appears to be a /29 (your "public" IP assigned by their CPE lands in 10.0.0.0/8).
Re:WireGuard is now in Linus' tree by dboreham on Tuesday January 28, 2020 @11:55PM (#22177570)
NAT and double-NAT are common in WISP networks. Also of course most hotels, Starbucks, schools, conferences, airplanes, albeit those are not ISP services. And cellular carriers often NAT.
Re:WireGuard is now in Linus' tree by plapetomain on Wednesday January 29, 2020 @04:12AM (#22178740)
Almost every ISP will have a firewall of some kind, but in the US this is usually just blocking 25 incoming, sometimes 80 (fios), maybe a few other ports.

I have run services on port 443 on Optimum and FiOS for years.

IP addresses don’t change frequently. Usually what happens is there will be some maintenance and you’ll end up with a new IP because you lost the lease in the interim. If you keep your equipment on though you can have the same reachable IP address for years.

I use a dynamic DNS service so this is rarely a big deal.

Not sure why this is so hard for you to grasp. You keep arguing, for what reason?

Re:WireGuard is now in Linus' tree by 3xblah on Wednesday January 29, 2020 @04:27AM (#22178815)
"I have run services on port 443 on Optimum and FIOS for years."

What is Optimum, FIOS.

WG does not work over TCP.

Try running a UDP-only DNS server from home on some random port. If you know the port can you reach it via UDP from the internet.

A TCP service listening on port 443 on an ISP customer's IP address in the US might be reachable from the internet. However, this topic is neither TCP nor port 443 nor is it restricted to just the US.

Re:WireGuard is now in Linus' tree by plapetomain on Wednesday January 29, 2020 @06:13AM (#22179353)
Optimum and Fios are two isps in the US.

> Try running a UDP-only DNS server from home on some random port.

No reason to run DNS.

However, I run openvpn udp between three houses (fios, Comcast, cablevision) for nearly 15 years. It’s pretty common, works fine.

Again in the US... cable, fiber and dsl internet service comes with a public mostly unfiltered IPv4 address, the address is dynamic but in practice it is extremely stable.

End of story.

No idea why you’re acting like such an imbecilic tool in this thread. The whole time I have mentioned that this is the case for major US “landline” ISPs. Yes there are plenty of counterexamples, not sure what point you’re trying to prove.

Re:WireGuard is now in Linus' tree by 3xblah on Wednesday January 29, 2020 @01:29PM (#22184089)
"No reason to run DNS."

Hmmm, it was a yes or no question. Are you suggesting it work would if you did.

Re:WireGuard is now in Linus' tree by plapetomain on Wednesday January 29, 2020 @04:11PM (#22185872)
Yes, pretty much since most ISPs do not block UDP port 53.

I have no reason to run DNS on a home internet connection. What would a sane use case be? They don’t block it because it would be stupid to use it anyway.

Ports that are typically blocked include 67, 139, 161, 520, 547, etc.. ie dhcp, rip, smb, snmp... none of them are any great loss to those that want to run a vpn.

Running a VPN or ssh service is another story and it works fine both TCP and UDP.

Re:WireGuard is now in Linus' tree by 3xblah on Wednesday January 29, 2020 @08:32PM (#22188111)
As someone else pointed out, the issue is mainly NAT not necessarily just "blocked" ports. What works with your ISP may not work with someone else's.
Re:WireGuard is now in Linus' tree by lizknope on Wednesday January 29, 2020 @07:53AM (#22179917)
Just to confirm what you are saying.

I had a Time Warner cable modem for 15 years and the IP address would only change after a sustained power outage. Usually had the same IP for a year.

My AT&T Fiber IP address has not changed in 2 years and that is even after 2 power outages of about 12 hours.