<feed xmlns='http://www.w3.org/2005/Atom'>
<title>labitat-ansible/roles/space_server, branch new-tor-exit-range</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/'/>
<entry>
<title>space_server: add dedicated VLAN for Tor exit nodes</title>
<updated>2021-09-06T19:06:02+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-09-06T18:13:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=6856b82bdcd61ea25cac8bc64a9114d908e6ea9e'/>
<id>6856b82bdcd61ea25cac8bc64a9114d908e6ea9e</id>
<content type='text'>
Move the Tor exit nodes to their own VLAN, and
their own address space.

Background for move
-------------------

For the first Tor exit node, we where able to
create inet6num object 2a01:4262:1ab:20::71/128.
So we could assign a specific Tor abuse contact.

When we added the second node it was no longer
possible to create /128 inet6num objects, but
only up to /64. We therefore need to move our
Tor exit nodes to a dedicated address space.

Connection tracking
-------------------

Connection tracking is quite expensive, so
it's better to only do it for Tor traffic,
when we actually need it, which is only when
internal clients need to access the servers.

In the future conntrack could also be disabled
for labicolo in general.

Current stats
~~~~~~~~~~~~~

[root@space ~]# grep -v '185\.38\.175\.7[12] ' /proc/net/nf_conntrack |
	grep -v '2a01:4262:01ab:0020:0000:0000:0000:007[12]' | wc -l
4071

[root@space ~]# wc -l /proc/net/nf_conntrack
39138 /proc/net/nf_conntrack

Currently 4071 out of 39138 connections are not Tor related.

Also reading /proc/net/nf_conntrack is quite slow atm.:

[root@space ~]# time cat /proc/net/nf_conntrack &gt; /dev/null

real    0m35.097s
user    0m0.010s
sys     0m28.114s

Signed-off-by: Asbjørn Sloth Tønnesen &lt;asbjorn@labitat.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the Tor exit nodes to their own VLAN, and
their own address space.

Background for move
-------------------

For the first Tor exit node, we where able to
create inet6num object 2a01:4262:1ab:20::71/128.
So we could assign a specific Tor abuse contact.

When we added the second node it was no longer
possible to create /128 inet6num objects, but
only up to /64. We therefore need to move our
Tor exit nodes to a dedicated address space.

Connection tracking
-------------------

Connection tracking is quite expensive, so
it's better to only do it for Tor traffic,
when we actually need it, which is only when
internal clients need to access the servers.

In the future conntrack could also be disabled
for labicolo in general.

Current stats
~~~~~~~~~~~~~

[root@space ~]# grep -v '185\.38\.175\.7[12] ' /proc/net/nf_conntrack |
	grep -v '2a01:4262:01ab:0020:0000:0000:0000:007[12]' | wc -l
4071

[root@space ~]# wc -l /proc/net/nf_conntrack
39138 /proc/net/nf_conntrack

Currently 4071 out of 39138 connections are not Tor related.

Also reading /proc/net/nf_conntrack is quite slow atm.:

[root@space ~]# time cat /proc/net/nf_conntrack &gt; /dev/null

real    0m35.097s
user    0m0.010s
sys     0m28.114s

Signed-off-by: Asbjørn Sloth Tønnesen &lt;asbjorn@labitat.dk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: nftables: colo: accept BGP connections</title>
<updated>2021-06-19T09:08:51+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-06-18T21:55:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=b1904dcc2937c93408234311793302aedca859c4'/>
<id>b1904dcc2937c93408234311793302aedca859c4</id>
<content type='text'>
Until now BGP connections have only been established
when the space server has initiated the connection to
the peer.

It's best practice for both BGP speakers to be able to
connect to one another, lowering recovery time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Until now BGP connections have only been established
when the space server has initiated the connection to
the peer.

It's best practice for both BGP speakers to be able to
connect to one another, lowering recovery time.
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: nftables: colo: use dynamic reverse path filter</title>
<updated>2021-06-19T09:08:04+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-06-18T21:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=23a84a3cfeac299ef34e422cdcd9ea3499376a90'/>
<id>23a84a3cfeac299ef34e422cdcd9ea3499376a90</id>
<content type='text'>
This patch changes the reverse path filtering of the labicolo VLAN
to take place in the prerouting hook, using the kernel routing
table, and removes the need to maintain a static prefix list.

Labicolo routes are exported to the kernel routing table by BIRD,
hence it should be sufficient to only have prefix lists there.

This change has been tested, and it's only possible to spoof
fellow labicolo members address space (same as before).

Esmil: prerouting before input/forward makes more sense to me
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes the reverse path filtering of the labicolo VLAN
to take place in the prerouting hook, using the kernel routing
table, and removes the need to maintain a static prefix list.

Labicolo routes are exported to the kernel routing table by BIRD,
hence it should be sufficient to only have prefix lists there.

This change has been tested, and it's only possible to spoof
fellow labicolo members address space (same as before).

Esmil: prerouting before input/forward makes more sense to me
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: bird: remove old prefix lists</title>
<updated>2021-06-19T09:06:21+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-06-18T21:37:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=f72c04ecb33b1319b611da9df8296c597092c376'/>
<id>f72c04ecb33b1319b611da9df8296c597092c376</id>
<content type='text'>
Now that we use communities, we don't need this prefix filter
anymore, only the per-customer prefix filters.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we use communities, we don't need this prefix filter
anymore, only the per-customer prefix filters.
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: bird: export prefixes based on communities</title>
<updated>2021-06-19T09:05:58+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-06-18T21:37:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=76337d534a85659010385a71d09be488cdcfd112'/>
<id>76337d534a85659010385a71d09be488cdcfd112</id>
<content type='text'>
We only announce a prefix, if we have recieved it from a customer
connection or if we originate it our self.

This way we avoid announcing prefixes matching the earlier used,
prefix list if we haven't recieved it via the customer connection.
This is important for multi-homed labicolo customers.

Esmil: consistent brace placement
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We only announce a prefix, if we have recieved it from a customer
connection or if we originate it our self.

This way we avoid announcing prefixes matching the earlier used,
prefix list if we haven't recieved it via the customer connection.
This is important for multi-homed labicolo customers.

Esmil: consistent brace placement
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: bird: set communities on import</title>
<updated>2021-06-19T09:04:59+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-06-18T21:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=ff8ef6bdd84a5edc068069b5ff382c35e2456881'/>
<id>ff8ef6bdd84a5edc068069b5ff382c35e2456881</id>
<content type='text'>
Assign large communities on prefix import.

Later we can then use the community, to decide if we should
announce it to our peers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Assign large communities on prefix import.

Later we can then use the community, to decide if we should
announce it to our peers.
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: bird: prepare large communities</title>
<updated>2021-06-19T09:04:21+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-06-18T21:34:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=2251118ea48c86e84b58725fd9651ba3fcae5026'/>
<id>2251118ea48c86e84b58725fd9651ba3fcae5026</id>
<content type='text'>
This patch prepares us for adopting Large BGP Communities (RFC 8092).

Basic format of Large BGP Communities:
  &lt;uint32_t asn&gt;:&lt;uint32_t function&gt;:&lt;uint32_t value&gt;

We use function 1 for storing prefix type (or relation).

We then assign a value to transit, peering, customer and originated
prefixes.

Large BGP Communities
http://largebgpcommunities.net/
https://tools.ietf.org/html/rfc8092
https://tools.ietf.org/html/rfc8195

Esmil: consistent brace placement
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch prepares us for adopting Large BGP Communities (RFC 8092).

Basic format of Large BGP Communities:
  &lt;uint32_t asn&gt;:&lt;uint32_t function&gt;:&lt;uint32_t value&gt;

We use function 1 for storing prefix type (or relation).

We then assign a value to transit, peering, customer and originated
prefixes.

Large BGP Communities
http://largebgpcommunities.net/
https://tools.ietf.org/html/rfc8092
https://tools.ietf.org/html/rfc8195

Esmil: consistent brace placement
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: bird: asbjorn: enable TTL security</title>
<updated>2021-06-18T22:30:02+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-06-18T22:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=0b9f7c5cfad16602bf2df5276a5bee18888fd618'/>
<id>0b9f7c5cfad16602bf2df5276a5bee18888fd618</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: bird: fiberby: enable TTL security</title>
<updated>2021-06-18T22:00:32+00:00</updated>
<author>
<name>Asbjørn Sloth Tønnesen</name>
<email>asbjorn@labitat.dk</email>
</author>
<published>2021-06-18T21:03:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=b90e3611976192db56394b57c9527db7a58af62c'/>
<id>b90e3611976192db56394b57c9527db7a58af62c</id>
<content type='text'>
This protects us amount otherthings against 3rd parties
resetting the TCP connection underneat our BGP sessions.

This has been enabled in both ends, and this
_MUST_ remain enabled, otherwise these sessions
will go down.

If this needs to be disabled for some reason
then it must be coordinated with Fiberby.

RFC 5082 - The Generalized TTL Security Mechanism
https://datatracker.ietf.org/doc/html/rfc5082
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This protects us amount otherthings against 3rd parties
resetting the TCP connection underneat our BGP sessions.

This has been enabled in both ends, and this
_MUST_ remain enabled, otherwise these sessions
will go down.

If this needs to be disabled for some reason
then it must be coordinated with Fiberby.

RFC 5082 - The Generalized TTL Security Mechanism
https://datatracker.ietf.org/doc/html/rfc5082
</pre>
</div>
</content>
</entry>
<entry>
<title>space_server: bird: fix prefix error</title>
<updated>2021-06-17T22:46:51+00:00</updated>
<author>
<name>Hafnium</name>
<email>haf@hafnium.me</email>
</author>
<published>2021-06-17T22:11:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.2e8.dk/labitat/labitat-ansible/commit/?id=1a0e6180c199225b1790d74614a4c727cfec1f7d'/>
<id>1a0e6180c199225b1790d74614a4c727cfec1f7d</id>
<content type='text'>
The prefix was only routeable on the intern network, not the whole
internet, as it was not added in local_prefix_v6.
The 2a0e:8f02:f034::/48 is attached to my ASN, AS211153

Commit message fixed up by Esmil
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The prefix was only routeable on the intern network, not the whole
internet, as it was not added in local_prefix_v6.
The 2a0e:8f02:f034::/48 is attached to my ASN, AS211153

Commit message fixed up by Esmil
</pre>
</div>
</content>
</entry>
</feed>
