Hot answers tagged

16

An ip address consists of four numbers separated with a dot between each. You read it from left to right, and each dot adds a level of detail. This is very similar to a real address, think about: Country.City.Street.Housenumber I'm sorry, but this is simply wrong. The dots do not have any significance. They are only there to make a 32-bit binary number (...


8

You don't need even that detail. Simply treat them as magic values: Short answer: An IP address has four blocks of digits. There is a standard notation called CIDR where if you put /24 at the end it means every IP address that starts by the same three numbers. So if you put 192.168.120.0/24 that means that access is allowed from every IP address from 192....


6

... how many house numbers the street has. If you have more than 256 houses in a street, you need to use part of the street number for house numbers. This is only important to know when you want to know if someone else lives on the same street as you because you drop off letters directly instead of giving them to the post office.


5

You're doing what you should be doing. Create the rules, save the rules, then load the rules on each host that should have them. A possible refinement when using iptables for large lists of rules would be IP Sets.


4

IANA assigned the 100.64.0.0/10 IP address block to ensure the proper working of carrier-grade NAT (CGN). Many companies often use this space incorrectly as a private IP space, instead of the ranges specified in RFC1918. RFC6518 address space is designed to be used between a carrier router's downstream interface to their customer access network and the ...


3

Here are some partial building blocks for you: "Lets say you have an IP address, for example 123.4.5.6. It is a single IP address. However, if we change it a bit, we can get something like this: 123.0.0.0/8 That latter concept is something called a CIDR notation. You can think now that it is kind of a bunch of IP addresses. 123.0.0.0/8 means the same as ...


1

Nobody has yet addressed the "why" of subnet masks. At least in my understanding... A subnet mask represents the scope of a broadcast domain. Computers/devices within a subnet domain are able to discover other devices within that subnet. They can also find out how to communicate (find each others address) even though they initially know nothing ...


1

An IPv4 IP address is 32 bits of data, often written as 4 8 bit fields (A.B.C.D), (or, in binary, aaaaaaaa.bbbbbbbb.cccccccc dddddddd) . Netmasks are 32 bits, as well, and can be written the same way. The IP address is, for routing purposes, divided into "network" and "host" fields, by the netmask. /20 and /24 are abbreviations for 20 ...


1

CloudFront IPs change regularly as new edge locations are added, so you can't rely on it being static. The key here I think is to block everything except CloudFront hitting the server, which can be done with headers as described here. Basically CloudFront adds a header, if the header isn't present Nginx doesn't serve the request. You should make an exception ...


1

To get interface-related info, you need IF-MIB. Specifically, poll IF-MIB::ifPhysAddress OID to get MAC addresses, for example: snmpwalk -v 2c -c public localhost IF-MIB::ifPhysAddress That should return one or a bunch of lines, depending on how many interfaces are present on the box. They may look something like this: IF-MIB::ifPhysAddress.1 = STRING: 01:...


1

Here are a couple of techniques, which I used a lot for similar tasks. you can use jump server for forwarding traffic between your raspberry PI and you (your ssh client), however, you should somehow manage to connect (using reverse ssh) your raspberry to the jump server. This can be achieved via cron jobs or using PubSub messaging (Amazon IoT, PubNub, etc.) ...


Only top voted, non community-wiki answers of a minimum length are eligible