V
V
visoVV2020-02-07 12:02:13
SPF
visoVV, 2020-02-07 12:02:13

How to properly subnet ip for SPF?

There are a number of ip addresses, for example:
178.250.241.53 / 78.108.88.230 / 95.46.8.104 / 93.170.123.88 / 31.148.99.245
178.250.242.29 / 78.108.91.180 / 93.170.123.209 / 78.108.88.184 / 178.250.246.80
185.209 .28.111

They all need to be registered in the SPF for 1 domain
We can only specify 10 values ​​in a record.

It is required to unite all addresses and prescribe a subnet, by what value and in what volume of the network /16.24 can be registered.

Is it possible to specify a "big" range (the whole world)

178.250.241.53 / 178.250.242.29 as I understand it, these are already separate subgrids 241 and 242,
they can be registered as different subgrids or can they be combined into a grid?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Dubrovin, 2020-02-07
@z3apa3a

It is not necessary to do this (indicate large ranges, especially those containing unknown resources), it is better to make several entries and include them in the main one via include, just do not allow large nesting, because SPF by the standard should be resolved in 10 requests.

Y
Yakov, 2020-04-30
Svetsky @jamessvetsky

Good afternoon!
The SPF record has two restrictions: The
length is 256 bytes
AND the number of modifiers that cause DNS queries is no more than 10.
The ip4 and ip4 modifiers do not cause queries.
That is, if you have 11 IP addresses, you can make an entry like
v=spf1 ip4:178.250.241.153 ip4:178.250.241.153 ip4:178.250.241.153 ip4:178.250.241.153 ip4:178.250.241.153 ip4:178.250 241.153 ip4:178.250.241.153 ip4:178.250.241.153 ip4:178.250.241.153 ip4:178.250.241.153 -all - of course with different IPs. The length of this entry is 231 bytes.
Or you can make this entry for a subdomain, for example, for spf.mycompany.ru and include it in the main one using the include modifier: v=spf1 include:spf.mycompany.ru -all
If the IP addresses do not fit into one entry (precisely by the length of the entry), make two - spf1.mycompany.ru and spf2.mycompany.ru and the main v=spf1 include:spf1.mycompany.ru include:spf2.mycompany.ru -all
A good example:
Yandex, record _spf.yandex.ru - v=spf1 include:_spf-ipv4.yandex.ru include:_spf-ipv6.yandex.ru ~all
In turn _spf-ipv4.yandex.ru - v=spf1 ip4 :213.180.223.192/26 ip4:37.9.109.0/24 ip4:37.140.128.0/18 ip4:5.45.192.0/19 ip4:5.255.192.0/18 ip4:77.88.0.0/18 ip4:87.250.224.0/19 ip4: 93.158.136.48/28 ip4:95.108.130.0/23 ip4:95.108.192.0/18 ip4:141.8.132.0/24 ip4:5.45.254.0/25 ~all (12 ranges, ip4 modifiers)
_spf-ipv6.yandex.ru - v=spf1 ip6:2a02:6b8:0::/52 ip6:2a02:6b8:0:1a2d::/64 ip6:2a02:6b8:0:2519::/64 ip6: 2a02:6b8:0:1000::/52 ip6:2a02:6b8:b030::/64 ip6:2a02:6b8:b030:1000::/64 ip6:2a02:6b8:b011:900::/56 ip6: 2a02:6b8:b010:3046::/64 ip6:2a02:6b8:b010:7600::/56 ~
all :_spf.yandex.net (v=spf1 redirect=_spf.yandex.ru) - already 4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question