How is discord api detecting your ip? - api

How is the discord API detecting your IP when rate-limiting your computer?
Even by doing requests trough tor and resetting the connection every 5 requests to change my IP, it still rates limit me (you probably know what I am doing, just note that it's for fun, quarantine is boring)
How does it know it still your computer? How does it work?

Exposing an IP is a fundamental part of how the internet works. When you connect to a service, you are sending data to its IP address, including your IP address so that the service may reply to you. There's no way around this, as if the IP given was incorrect, you would not get a reply from that service. Changing your IP using a proxy, VPN, or like you've been using, TOR, is still exposing the IP address of the end point of the proxy, so that the service can respond to the proxy and have the proxy send the request back to you.
Typically, if you are hitting rate-limits that often, you are doing something which is not permitted by the service you are using. If you continually hit rate-limits, the service will catch on and apply harsher rate limits, or even terminate your account. In discord especially, hitting rate-limits that often would indicate you are performing requests with malicious intent. If that's not true, you should re-evaluate how you're going about what you're doing, as there will be a better solution to your problem.

Related

Need help changing my website's name / address

this might sound a bit amateur-ish but I'm in a bit of a situation here.
So I created myself a website and managed to get it working on localhost, I tried port forwarding ports 80,443 but nothing helped, So next thing I'm googling around and I read about ngrok and it actually worked. Got it working on a long randomly generated domain but the problem is that I want to use the one that I have from no-ip.com. How can I do that please? I'm very lost here.
Software being used: Xampp (Apache,MySQL)
I've reserved a DHCP ip-address for my PC in my router's settings, hopefully that helps? I don't know. Help me internet.
There are a whole bunch of possible reasons that this might not work. Here are a few of them.
Your ISP
Even if you have port forwarding set up properly on your router, it is still possible that you cannot do what you want.
First, many ISPs block serving websites from residential internet connections. Connections to port 80/443 will never even reach your router. You might try experimenting by forwarding a different port number (such as 8000 instead of 80) to see if the traffic can get through on that port. (However, that will not work as a practical solution since your users will not know to use an alternate port and your ISP can choose to terminate your service if you are violating the terms of your agreement.)
Second, due to the exhaustion of public IPv4 addresses, some ISPs are implementing Carrier-Grade NAT (CGNAT, a.k.a. Large-Scale NAT - LSN). Instead of giving your router a public IP address, they give your router a private IP address inside their network. Once again, connections to port 80/443 (or any other port for that matter) will never reach you. You can check if you are behind CGNAT by going to your router's setting and finding the public IP address, then going to https://whatsmyip.com/ and seeing if it is the same or different. (In theory, you should be able to tell that you have CGNAT if your router's IP address is between 100.64.0.0 - 100.127.255.255, but in practice some ISPs use other private network ranges too, such as 10.0.0.0 - 10.255.255.255.)
The reason Ngrok works for you is because Ngrok opens a tunnel from your computer to their cloud servers and sends the traffic through that tunnel.
DNS
You mentioned in the comments that you have the DNS set to resolve the private IP of your computer. That certainly will not allow users on the public internet to get to your site, because they cannot connect to your address.
However, you also mentioned in the comments that if you change the DNS to point to your public IP, it doesn't work from either inside or outside. This could mean your problem is one of the ISP issues described above. It could also mean that your router does not support Hairpin-NAT (a.k.a. NAT Reflection), which is how the router would be able to redirect local traffic back to the local server instead of trying to send it out over the internet.
Firewall
Your computer's firewall can look at the source IP address of the incoming traffic, and it might be set not to allow external access to your web server. DO NOT DISABLE YOUR FIREWALL to try to get around this. Instead, you need to add a specific exception to the firewall rules to allow the incoming traffic. How you do this will depend on your operating system.

WebRTC on local network

I'm new to WebRTC and I was wondering if it's possible to have webRTC application on a local network without need for signaling since we have the IP addresses of all members on the network and if so how should I use RTCPeerconnectio to create an offer?
Thank you
No it is not possible.
Signalling is for more than just exchanging IP addresses. The clients also exchange information about media types and codecs.
You could possibly do some of the exchange via hard coding. But you would basically need to go through the whole negotiation, logging out all the candidates, offer, and answer. Even then I don't know if it would work the second time (with everything hardcoded). It also wouldn't work if you ever wanted to change media. It would be an interesting experiment.. but probably a huge waste of time.
It can be done! But kradical is right there will need to be some configuration ahead of time check out pion/offline-browser-communication
Here are the things you need to worry about
You don't need to hardcoded IP addresses anymore thanks to mDNS candidates. If you know the hostnames of the two computers they can both change IP addresses, and still be able to connect.
You need to know the DTLS certificate and ICE credentials ahead of time. If you look at the repo I shared you can see how it is done there. I did Go <-> Browser because it is the Open Source project I work on, but can easily be Browser <-> Browser as well.
I would connect with only a DataChannel at first, and then re-negotiate with all the details around media (tracks you wish to send and supported codecs)

How to check if DynDNS is working

Newbie programmer here. I'm building an app for an API that requires an IP address for authentication. Basically, users have to send the API management their IPs and then each time a computer makes a request to their server, it verifies whether it's coming from a registered IP.
Since I work in a number of different places and thus end up with different IPs, I thought it would be easiest to use DynDNS to establish a URL that points to whatever my current IP is and then send that URL to the API management. So my first question is if this approach would in fact work?
Secondly, assuming this would work, I set up ben.dynalias.com and downloaded the DynDNS Updater client. It appears to be working: the updater says status: OK and displays my current IP. However, when I navigate to the URL (ben.dynalias.com) there's no response. Should this be the case? How can I tell if it's working?
I don't see any reason it shouldn't work as long as your updaters aren't overwriting each other by running at the same time automatically from different locations.
You can ping ben.dynalias.com and see if your current ip matches.
I just hosted ben.dynalias.com and it gave me your IP.
Since there is no web server running on that IP, then your browser will not be able to show you a page result.
You can use http://www.kloth.net/services/nslookup.php
to check and see if you get the correct IP from a host lookup.
Depending on how often your IP changes this might not be a great solution as the DNS will cache your hostname and will not try and resolve it again until the TTL expires normally minimum 1 hour.
whether the API management accepts a hostname instead of an IP address is a question only they can answer. Some will, many won't as it's "easier" to hijack a domain name than to hijack an ip address.
trying to browse to you-address.dynalias.com that points to your own public address rarely works, even if you opened up the right ports because your router will be highly confused. The best way to test such a setup is by using a phone or tablet with 3g/GPRS internet - of course after you set up port forwarding in the router to point the appropriate port to your computer.

Can we use WCF Discovery to discover services outside your local network?

Is it possible to use WCF discovery to access services that reside outside your local network ?
The short answer is no.
Discovery uses a UDP broadcast packet. You can discover anything that your UDP broadcast packet is allowed to reach. There is the catch, most routers, firewalls, and commercial switches block udp broadcast packets. You may be able to change the settings on your router where you connect to the next larger network (or internet), and you 'might' extend your discovery slightly. Again though, the very next switch or router you hit will most likely be set to block udp.
In this situation, most people design a "report in" server. This is one static place to which all other hosts and clients and pre-programmed to "report in" on startup. This one server keeps a table of where all hosts and clients are, and if one client wants to find a certain host, it asks this main server for the uri of the host its looking for.
EDIT:
Robin mentioned increasing the TTL (Time To Live) from the default of 1 to a higher number. Maybe this will help someone.
https://serverfault.com/a/619825/146341

Can I use IP addresses to limit API access

I have a mini API that is only for an app I have built. The API service is on a separate domain to my app. I make jsonp calls to it and receive json in return.
Therefore I only want my app to be able to access it. Can I just list a series of IP addresses for my app and allow them? Is there a better way to stop requests from anyone else to my API?
The best way to implement IP-based filtering would be at the web-server level. Here's a brief introduction to access control with Apache. If that happens to be your web-server.
If the IP stays the same throughout time, yes this is a valid idea. Another way would be with an id and a key, if you expect further usage from other (dynamic) ip adresses.
What operating system is the API service running on? If it's Linux, look into iptables to only allow a certain IP to access a specific port.
Honestly, I wouldnt go with an IP based solution. While it may work in the short term, it will make things hard in the future. For example, what if your ip provider decides to do a reset? Most likely (unless you have explicitly established the need for static ip with your provider) your ip will change. Then your program will error and you wont know why (or worse, you wont know that a computer is now disconnected). Furthermore, if you want to add machines, think about managing 1000 ips....yikes! The 'right' way of doing this would be to authenticate the machines using some other scheme (user/pass, pki, etc.)