Recent from talks
Contribute something
Nothing was collected or created yet.
IP address blocking
View on WikipediaThis article needs additional citations for verification. (June 2025) |
IP address blocking or IP banning is a configuration of a network service that blocks requests from hosts with certain IP addresses. It is commonly used to protect against brute force attacks and to prevent access by a disruptive address. It can also be used to restrict access to or from a particular geographic area; for example, syndicating content to a specific region through the use of Internet geolocation.
IP address blocking can be implemented with a hosts file (e.g., for Mac, Windows, Android, or OS X) or with a TCP wrapper (for Unix-like operating systems). It can be bypassed using methods such as proxy servers; however, this can be circumvented with DHCP lease renewal.
How it works
[edit]Every device connected to the Internet is assigned a unique IP address, which is needed to enable devices to communicate with each other.[1] With appropriate software on the host website, the IP address of visitors to the site can be logged and can also be used to determine the visitor's geographical location.[2][3]
Logging the IP address can, for example, monitor if a person has visited the site before, for example, to vote more than once, as well as to monitor their viewing pattern, how long since they performed any activity on the site (and set a time out limit), besides other things.
Knowing the visitor's geolocation indicates, besides other things, the visitor's country. In some cases, requests from or responses to a certain country would be blocked entirely. Geo-blocking has been used, for example, to block shows in certain countries, such as censoring shows deemed inappropriate. This is especially frequent in places such as China.[4][5]
Internet users may circumvent geo-blocking and censorship and protect their personal identity using a Virtual Private Network.[4]
On a website, an IP address block can prevent a disruptive address from access, though a warning and/or account block may be used first. Dynamic allocation of IP addresses by Internet service providers (ISPs) can complicate IP address blocking by making it difficult to block a specific user without blocking many IP addresses (blocks of IP address ranges), thereby creating collateral damage.[6] For websites with low-enough popularity (often intentionally, with explicitly declaring the majority of potential visitors as out-of-scope) the large-scale collateral damage is often tolerable: most of website accesses, for addresses belong to the same IP range, are accesses of persons just having a dynamic IP address, but the same ISP, country, city and city districts, based on which IP ranges are assigned by ISPs. On websites with low-enough total visitor count, it is improbable that all these features match more than a single person. For large websites, Terms of Services usually reserve the right of their admins to block access at own discretion, enabling them to create collateral damage this way.
Implementations
[edit]Unix-like operating systems commonly implement IP address blocking using a TCP wrapper, configured by host access control files /etc/hosts.deny and /etc/hosts.allow.
Both companies and schools offering remote user access use Linux programs such as DenyHosts or Fail2ban for protection from unauthorized access while allowing permitted remote access. This is also useful for allowing remote access to computers. It is also used for Internet censorship.
IP address blocking is possible on many systems using a hosts file, which is a simple text file containing hostnames and IP addresses. Hosts files are used by many operating systems, including Microsoft Windows, Linux, Android, and OS X.[1]
Circumvention
[edit]
Proxy servers and VPNs can be used to bypass the blocking of traffic from IP addresses.[7] However, anti-proxy strategies are available. Consumer-grade internet routers can sometimes obtain a new public IP address on-demand from the ISP using DHCP lease renewal to circumvent individual IP address blocks. This, however, can be countered by blocking the range of IP addresses from which the internet service provider is assigning new IP addresses, which is usually a shared IP address prefix. However, this may impact legitimate users from the same internet service provider who have IP addresses in the same range, which inadvertently creates a denial-of-service attack.
In the case Craigslist v. 3Taps (2013), US federal judge Charles R. Breyer held that circumventing an address block to access a website is a violation of the Computer Fraud and Abuse Act for "unauthorized access", and is thus punishable by civil damages.
See also
[edit]References
[edit]- ^ a b The John Marshall Journal of Computer & Information Law. Center for Computer/Law. 1996. p. 466.
- ^ "What is an IP address?". HowStuffWorks. 2001-01-12. Retrieved 2019-12-13.
- ^ "How cookies track you around the web & how to stop them". Privacy.net. 2018-02-24. Retrieved 2019-12-13.
- ^ a b "What Is Geo-Blocking and How to Bypass It". Avast. Archived from the original on 2023-01-03. Retrieved 2021-10-12.
- ^ "Media Censorship in China". Council on Foreign Relations. Retrieved 2021-10-12.
- ^ Groome, Patrick. "[Community] The Trouble with IP Bans". blog.vanillaforums.com. Archived from the original on 2022-07-13. Retrieved 2021-10-12.
- ^ "How to: Circumvent Online Censorship". ssd.eff.org. Archived from the original on 2018-12-23.
External links
[edit]
Media related to IP address blocking at Wikimedia Commons
IP address blocking
View on GrokipediaFundamentals
Definition and Core Principles
IP address blocking refers to the configuration of network devices, such as routers or firewalls, to inspect and discard data packets based on their source or destination Internet Protocol (IP) addresses, thereby preventing communication between specified endpoints and the protected network or service.[8] This technique operates primarily at the network layer (Layer 3 of the OSI model), where IP addresses serve as identifiers for devices and hosts in packet-switched networks, allowing for rule-based filtering without regard to higher-layer protocols or content. The method relies on the inherent structure of IP packet headers, which include explicit source and destination address fields, enabling devices to evaluate traffic against predefined access control lists (ACLs) or equivalent policies before forwarding.[8] Core principles of IP address blocking stem from the stateless or stateful nature of packet inspection in IP networks. In stateless filtering, each packet is evaluated independently against fixed rules—such as denying all traffic from a /24 subnet (e.g., 192.0.2.0/24)—without maintaining connection state, which ensures low computational overhead but risks incomplete blocking of fragmented or multi-packet flows.[8] Stateful variants, conversely, track active sessions (e.g., via connection tuples of source IP, destination IP, ports, and protocols) to enforce bidirectional controls, as implemented in modern firewalls, allowing for more granular denial of established connections while permitting initial handshakes only from whitelisted addresses. These principles exploit the deterministic routing of IP datagrams, where blocking at an ingress point causally interrupts the path from sender to receiver, but efficacy depends on the topological position of the filtering device—edge routers block inbound threats effectively, yet core network blocks may collateralize innocent traffic due to IP address sharing via Network Address Translation (NAT).[8] Empirical implementations, such as those in Cisco IOS ACLs, demonstrate that matching occurs in hardware-accelerated ternary content-addressable memory (TCAM) for high-speed decisions, processing millions of packets per second with minimal latency. Fundamentally, IP blocking embodies a coarse-grained access control paradigm grounded in endpoint identification rather than behavioral analysis, prioritizing simplicity and scalability over precision; for instance, blocking a single IPv4 address (32 bits) or CIDR range targets up to 2^32 endpoints, but dynamic address assignment (e.g., via DHCP) introduces temporal variability, necessitating periodic rule updates.[8] This approach aligns with Internet engineering principles of minimal intervention, as outlined in IETF guidelines, avoiding deep packet inspection to preserve end-to-end transparency, though it inherently collides with shared addressing realities—over 4 billion IPv4 addresses mask multiple users behind carriers' pools, leading to overblocking risks documented in operational analyses.[8] In IPv6 environments, with 128-bit addresses, blocking scales to vast ranges but amplifies collateral effects absent widespread NAT, underscoring the principle that address uniqueness causally enhances isolation but demands precise rule specificity to mitigate false positives.IP Address Fundamentals Relevant to Blocking
An IP address serves as a unique numerical label assigned to each device connected to a computer network that uses the [Internet Protocol](/page/Internet Protocol) for communication, enabling the routing of data packets to their intended destinations.[9] In the context of blocking, this identifier forms the basis for network-level restrictions, where firewalls or routers inspect packet headers containing source or destination IP addresses and drop matching traffic.[10] The predominant IPv4 protocol employs 32-bit addresses, expressed in dotted-decimal notation (e.g., 192.0.2.1), yielding approximately 4.3 billion unique addresses, a scarcity that has driven widespread adoption of conservation techniques.[9] [11] Its successor, IPv6, utilizes 128-bit addresses in hexadecimal format (e.g., 2001:db8::1), providing about 3.4 × 10^38 possible addresses to accommodate global expansion without address-sharing mechanisms.[12] Blocking under IPv4 often encounters higher collateral effects due to address exhaustion, whereas IPv6's abundance supports direct, one-to-one device addressing, potentially enhancing blocking precision but requiring updated infrastructure.[13] IP addresses can be static, manually configured and unchanging, or dynamic, automatically assigned via protocols like DHCP for periods ranging from minutes to days, leading to frequent changes that undermine long-term blocking efficacy against mobile or residential users.[14] Private IP ranges, defined in RFC 1918 (e.g., 192.168.0.0/16), operate within local networks and are non-routable on the public internet, necessitating translation for external access.[15] Network Address Translation (NAT), commonly implemented in routers, maps multiple private internal IPs to a single public IP, allowing thousands of devices—such as in homes or cellular networks—to share it for outbound traffic.[16] This multiplexing, including carrier-grade NAT (CGNAT) used by ISPs, means blocking a public IP can inadvertently restrict unrelated users, as evidenced by blocklist contamination from address reuse, where one IP serves diverse endpoints.[17] Consequently, IP blocking targets networks rather than individuals, amplifying overblocking risks in IPv4-dominated environments while IPv6 deployment mitigates such issues through native end-to-end addressing.[18]Technical Mechanisms
Operational Implementation
IP address blocking is operationally implemented through rule-based packet filtering mechanisms in network hardware and software, primarily via access control lists (ACLs) configured on firewalls, routers, and switches. These ACLs consist of sequential entries specifying criteria such as source or destination IP addresses, protocols, and ports, with actions to permit or deny matching traffic. Devices evaluate incoming and outgoing packets against the ACL in order, applying the first matching rule and enforcing an implicit deny for any unmatched packets, thereby preventing blocked IPs from establishing connections or traversing the network.[2][19][20] In enterprise and ISP environments, firewalls like Cisco ASA or Fortinet products apply ACLs to interfaces, supporting both stateless filtering—where each packet is inspected independently—and stateful inspection, which tracks connection states to block response traffic from permitted initiations involving blacklisted IPs. Cloud providers implement analogous controls; for instance, Amazon Web Services uses VPC network ACLs to filter traffic at subnet boundaries, while Azure employs IP ACLs for virtual network security groups, each capable of blocking specific IPs or ranges to mitigate risks like denial-of-service attacks.[21][22][19] At the host or server level, operating systems provide kernel-integrated tools for IP blocking; Linux distributions utilize iptables or its successor nftables to insert rules into netfilter chains, such asiptables -A INPUT -s 192.0.2.1 -j DROP to silently discard all inbound packets from a designated IP, enabling efficient, low-level enforcement without application involvement. Web servers extend this to application-layer control: Apache HTTP Server versions 2.4 and later use Require not ip directives in .htaccess files or virtual host configurations to reject HTTP requests from specified IPs, while Nginx employs similar deny statements in server blocks.[23][24]
Advanced implementations incorporate dynamic feeds for automated blocking; Cisco Firepower, for example, leverages Security Intelligence to cross-reference IP reputations from threat databases like Talos, instantly applying blocks to IPs associated with malware or exploits without manual ACL updates. In governmental contexts, directives enforce blocking at scale: on February 25, 2019, Russia's Federal Security Service (FSB) instructed Mobile TeleSystems (MTS) to filter ProtonMail's SMTP server IPs at the router level, demonstrating coordinated ISP-level operational deployment to restrict service access.[25][26]
