<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[AS215825 - Journey]]></title><description><![CDATA[How I created my own network  ?]]></description><link>https://blog.as215825.net/</link><image><url>https://blog.as215825.net/favicon.png</url><title>AS215825 - Journey</title><link>https://blog.as215825.net/</link></image><generator>Ghost 5.75</generator><lastBuildDate>Wed, 06 May 2026 11:57:09 GMT</lastBuildDate><atom:link href="https://blog.as215825.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Proxmox and VLAN - Why so dumb yet so logic  ?]]></title><description><![CDATA[<p>In my recent network configuration on Proxmox, I encountered an issue that had me scratching my head. I was settuping <code>vmbr5</code> on <code>bond0</code>, expecting to access the VLANs that were already declared in the network configuration. However, despite everything looking correct on the surface, I couldn&apos;t access the</p>]]></description><link>https://blog.as215825.net/proxmox-and-vlan-why-so-dumb-yet-so-logic/</link><guid isPermaLink="false">66ddd260da52fe000175d80a</guid><dc:creator><![CDATA[Baptiste Ferrando]]></dc:creator><pubDate>Sun, 08 Sep 2024 16:50:22 GMT</pubDate><media:content url="https://blog.as215825.net/content/images/2024/09/DALL-E-2024-09-08-18.49.29---A-less-dramatic-image-for-an-article-titled--Proxmox-and-VLAN.--The-image-should-feature-a-network-setup-with-neatly-arranged-network-cables-and-a-Pro.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.as215825.net/content/images/2024/09/DALL-E-2024-09-08-18.49.29---A-less-dramatic-image-for-an-article-titled--Proxmox-and-VLAN.--The-image-should-feature-a-network-setup-with-neatly-arranged-network-cables-and-a-Pro.png" alt="Proxmox and VLAN - Why so dumb yet so logic  ?"><p>In my recent network configuration on Proxmox, I encountered an issue that had me scratching my head. I was settuping <code>vmbr5</code> on <code>bond0</code>, expecting to access the VLANs that were already declared in the network configuration. However, despite everything looking correct on the surface, I couldn&apos;t access the VLAN.</p><p>Below is an example of the initial setup I used:</p><figure class="kg-card kg-image-card"><img src="https://blog.as215825.net/content/images/2024/09/proxmox1.PNG" class="kg-image" alt="Proxmox and VLAN - Why so dumb yet so logic  ?" loading="lazy" width="555" height="355"></figure><p>I configured <code>vmbr5</code> as a bridge on <code>bond0</code>, and tried to set up each <code>vmbr</code> to handle a specific VLAN, expecting them to work as intended. But despite this setup, I had no access to the VLANs.</p><h3 id="the-solution">The Solution</h3><p>After some trial and error, I discovered the solution. The trick is to create <code>vmbr5</code> on <code>bond0</code>, <strong>but</strong> then adapt the configuration of each <code>vmbr</code> to include as the bridge port: <code>vmbr5.&lt;VLAN number&gt;</code>.</p><p>Here&#x2019;s how the configuration looked after applying the fix:</p><figure class="kg-card kg-image-card"><img src="https://blog.as215825.net/content/images/2024/09/proxmox2.PNG" class="kg-image" alt="Proxmox and VLAN - Why so dumb yet so logic  ?" loading="lazy" width="562" height="256"></figure><p>Now, each <code>vmbr</code> is correctly pointing to its corresponding VLAN via the <code>vmbr5.&lt;VLAN number&gt;</code> interface. With this setup, everything worked perfectly.</p><h3 id="final-thoughts">Final Thoughts</h3><p>It&#x2019;s one of those things that makes you say : &quot;How dumb, yet so logical.&quot; It&#x2019;s a solution that works, but it&apos;s not exactly intuitive. Sometimes, the most straightforward solutions can be the most elusive.</p><p>By organizing the network bridges in this way, Proxmox can correctly manage and route the VLAN traffic, and now I can access the VLANs as intended. While the solution is simple in hindsight, the lack of intuition in the initial approach makes this a learning point for anyone setting up VLANs in Proxmox.</p>]]></content:encoded></item><item><title><![CDATA[How and why I hacked my PDU]]></title><description><![CDATA[<h2 id="chapter-1why">Chapter 1 - Why?</h2>
<p>After expanding my rack from 2U to 12U, I needed a simple solution that would allow me to remotely switch off outlets, monitor my consumption, and integrate it into Grafana. After a few minutes of research, I stumbled upon the &quot;Intertech SW-0816&quot; PDU. The</p>]]></description><link>https://blog.as215825.net/how-and-why-i-hacked-my-pdu/</link><guid isPermaLink="false">65f931790fc8b00001d314ab</guid><category><![CDATA[Hardware]]></category><dc:creator><![CDATA[Baptiste Ferrando]]></dc:creator><pubDate>Mon, 18 Mar 2024 06:38:00 GMT</pubDate><media:content url="https://blog.as215825.net/content/images/2024/03/Hacked-Image.webp" medium="image"/><content:encoded><![CDATA[<h2 id="chapter-1why">Chapter 1 - Why?</h2>
<img src="https://blog.as215825.net/content/images/2024/03/Hacked-Image.webp" alt="How and why I hacked my PDU"><p>After expanding my rack from 2U to 12U, I needed a simple solution that would allow me to remotely switch off outlets, monitor my consumption, and integrate it into Grafana. After a few minutes of research, I stumbled upon the &quot;Intertech SW-0816&quot; PDU. The quality/function/price ratio seemed perfect, so I decided to purchase it.</p>
<p>A week later, I received it and began testing. Everything worked as I imagined except, unfortunately, SNMP was not enabled, and I couldn&apos;t link it to my Prometheus... This is why I thought the simplest solution would be to hack it. Looking at the interface, it seemed likely possible.</p>
<h2 id="chapter-2how">Chapter 2 - How?</h2>
<p>Once logged in with the admin account of the PDU, I saw that all the data were displayed on the web page, so I had two options:</p>
<ul>
<li>The first: write a script that makes a GET request with basic auth, retrieves the page, and extracts the data.</li>
<li>The second: Find a vulnerability and see how the data is sent to WEB clients.</li>
</ul>
<p>I chose the second option because it seemed more fun, simple, and faster than the first.</p>
<p>And I&apos;m &quot;sorry&quot; to say that it was ridiculously easy to steal the data. By pressing F12 on my browser, then going to the &quot;Network&quot; tab, I saw that the application made 1 request per second to the URL &quot;http://<ip>/status.xml&quot;. I tested this page in incognito mode to see if, by any chance, I could access it without authentication, and it worked perfectly...</ip></p>
<p><img src="https://blog.as215825.net/content/images/2024/03/ici.PNG" alt="How and why I hacked my PDU" loading="lazy"></p>
<p>I ended up processing this information: Temperature, Amperage, Humidity, and a boolean on/off for the 8 outlets.</p>
<h2 id="chapter-3implementation">Chapter 3 - Implementation</h2>
<p>After finding a data source, I started to exploit it. I armed myself with my WebStorm IDE and began a NodeJS application, which is kind of my go-to language. It&apos;s worth noting that I&apos;m not a developer by any means, but that doesn&apos;t stop me from learning this language.</p>
<p>I started by making a request to the status.xml URL, retrieving the data, installing a prometheus-client module, and then creating all the fields I wanted to export. A very simple app that links the PDU data to a Prometheus server.</p>
<p><img src="https://blog.as215825.net/content/images/2024/03/ue.PNG" alt="How and why I hacked my PDU" loading="lazy"></p>
<p>Once the data was on the Prometheus server, all that was left was to link this data to a panel. So, I created a simple panel with the graphs and data I wanted.</p>
<p>And that&apos;s it, the setup is complete, and now it&apos;s time to show the result!</p>
<h2 id="chapter-3result">Chapter 3 - Result</h2>
<p>As you can see below, the result is, in my opinion, perfect.<br>
<img src="https://blog.as215825.net/content/images/2024/03/img.png" alt="How and why I hacked my PDU" loading="lazy"></p>
<p>This now allows me to have a consumption history as well as the real-time state of my electrical circuit!</p>
<p>To allow everyone to use the script and my findings, you&apos;ll find all the code and Grafana panel on my GitHub below!<br>
GitHub <a href="https://github.com/Verttigo28/Intertech-Grafana">Link</a></p>
]]></content:encoded></item><item><title><![CDATA[PVE Storage replication with different name]]></title><description><![CDATA[<p>Replicating a VM on Proxmox is still a challenging task, requiring several prerequisites, such as:</p>
<ul>
<li>VM storage must use ZFS.</li>
<li>The ZFS storage name must be identical on both nodes.</li>
<li>Nodes must be part of a cluster.</li>
</ul>
<p>After setting up my new nodes in a hyper-converged configuration, I was unable</p>]]></description><link>https://blog.as215825.net/pve-zfs-replication/</link><guid isPermaLink="false">65f8284fdd051a000152c3ab</guid><category><![CDATA[PVE]]></category><dc:creator><![CDATA[Baptiste Ferrando]]></dc:creator><pubDate>Sat, 16 Mar 2024 11:44:00 GMT</pubDate><media:content url="https://blog.as215825.net/content/images/2024/03/Proxmox-zfs-Guide.webp" medium="image"/><content:encoded><![CDATA[<img src="https://blog.as215825.net/content/images/2024/03/Proxmox-zfs-Guide.webp" alt="PVE Storage replication with different name"><p>Replicating a VM on Proxmox is still a challenging task, requiring several prerequisites, such as:</p>
<ul>
<li>VM storage must use ZFS.</li>
<li>The ZFS storage name must be identical on both nodes.</li>
<li>Nodes must be part of a cluster.</li>
</ul>
<p>After setting up my new nodes in a hyper-converged configuration, I was unable to maintain consistent naming across the board. Consequently, replicating my VMs through the GUI became impossible, leading me to create the tutorial below.</p>
<p>It&apos;s important to note that this feature was first requested in 2017, and as of the current date (March 17, 2024), Proxmox has yet to fully develop this functionality. Here is the bug tracker link: <a href="https://bugzilla.proxmox.com/show_bug.cgi?id=2087">Proxmox Bug Tracker Issue #2087</a></p>
<h3 id="prerequisites-for-replicating-your-vms-on-proxmox-using-my-script">Prerequisites for Replicating Your VMs on Proxmox Using My Script</h3>
<ul>
<li>ZFS storage</li>
<li>SSH keys between nodes for passwordless authentication</li>
</ul>
<h3 id="script-for-vm-replication">Script for VM Replication</h3>
<p>Below is the Bash script I use for VM replication:</p>
<pre><code class="language-bash">#!/bin/bash

# Define the array containing the VM IDs
ids=(100 101)

# Define the variable for the destination host
destinationHost=&quot;h2&quot;

# Define the variable for the destination ZFS pool
destinationPool=&quot;rpool/Replica&quot;

# Loop through the array of IDs
for id in &quot;${ids[@]}&quot;; do
    # Execute the qm config command to retrieve specific configuration and extract desired information
    while IFS= read -r line; do
        # Create the ZFS snapshot using the specified pool and the result of the previous command
        eval &quot;zfs destroy ${line}@Replication&quot;
        eval &quot;zfs snapshot ${line}@Replication&quot;
        # Variable to store the same name as local storage
        diskName=$(echo &quot;${line}&quot; | awk -F&apos;/&apos; &apos;{print $2}&apos;)
        eval &quot;zfs send ${line}@Replication | ssh ${destinationHost} zfs receive ${destinationPool}/${diskName} -F&quot;
    done &lt; &lt;(qm config &quot;$id&quot; | grep -E &apos;scsi[0-9]+:|virtio[0-9]+:&apos; | awk -F&apos;: |,&apos; &apos;{print $2}&apos; | tr : /)
done
</code></pre>
<p>The <code>ids</code> variable contains the IDs of the VMs I wish to replicate. The <code>destinationHost</code> variable specifies the replication host, and the <code>destinationPool</code> variable contains the destination ZFS pool (which can be created using <code>zfs create rpool/&lt;pool name&gt;</code>).</p>
<p>This script retrieves the configuration of each node, lists all your disks, creates a snapshot, and then sends it to the destination host. It&apos;s a simple script that replicates storage as Proxmox would.</p>
<p>To mount your VM on the replication host, you can either:</p>
<ul>
<li>Copy the VM&apos;s configuration from the source host and add its disks.</li>
<li>Recreate the configuration and import the replicated disks.</li>
</ul>
<p>I opted for the second option for simplicity and scalability over time. In the event of losing the source host, it takes a maximum of 5 minutes per VM to reconfigure and import the disks.</p>
<p>Note: This script destroys and recreates the snapshot each time to save space. However, this means the snapshot is fully sent to the destination server each time, generating significant network/disk traffic. In my case, this isn&apos;t an issue due to having 20GB/s symmetric and NVME storage.</p>
]]></content:encoded></item><item><title><![CDATA[HW - Setting up a Quanta T42S-2U]]></title><description><![CDATA[<p>Two weeks ago, I stumbled upon a &quot;Craft Computing&quot; video discussing a 2-node Quanta server. This was perfect timing as I was looking to expand my infrastructure but was constrained by the space in my half rack. I saw this as my only option.</p>
<p>In this blog, I</p>]]></description><link>https://blog.as215825.net/quanta-nightmares/</link><guid isPermaLink="false">65f74853dd051a000152c38e</guid><category><![CDATA[Hardware]]></category><dc:creator><![CDATA[Baptiste Ferrando]]></dc:creator><pubDate>Fri, 15 Mar 2024 19:46:00 GMT</pubDate><media:content url="https://blog.as215825.net/content/images/2024/03/DALL-E-2024-03-17-20.44.27---Illustrate-a-scene-where-a-man-is-visibly-upset-while-looking-at-a-computer-screen--which-displays-the-logo-and-interface-of-a-fictional-server-docume.webp" medium="image"/><content:encoded><![CDATA[<img src="https://blog.as215825.net/content/images/2024/03/DALL-E-2024-03-17-20.44.27---Illustrate-a-scene-where-a-man-is-visibly-upset-while-looking-at-a-computer-screen--which-displays-the-logo-and-interface-of-a-fictional-server-docume.webp" alt="HW - Setting up a Quanta T42S-2U"><p>Two weeks ago, I stumbled upon a &quot;Craft Computing&quot; video discussing a 2-node Quanta server. This was perfect timing as I was looking to expand my infrastructure but was constrained by the space in my half rack. I saw this as my only option.</p>
<p>In this blog, I will detail all the challenges I faced and the numerous trips back and forth to the data center.</p>
<h1 id="chapter-1ordering-the-server">Chapter 1 - Ordering the Server</h1>
<p>After extensive research, I found the Quanta T42S-2U, which houses 4 independent nodes, each with relatively recent processors and 128GB of RAM. I found several options on eBay and opted for the cheapest one. Since I already had a large server, it didn&apos;t make sense to go for something much larger.</p>
<p>&#x20AC;300 for the server and &#x20AC;200 for shipping later (ouch), the server arrived a week later.</p>
<h1 id="chapter-2the-troubles-begin">Chapter 2 - The Troubles Begin</h1>
<p>Upon receiving the server, I noticed two things: the transport protection foam had expanded and opened, filling the connector of 2 of the 4 nodes with plastic. It wasn&apos;t too serious; I managed to clean it with alcohol. The second issue was the absence of rails in the boxes, which was inconvenient but didn&apos;t stop me from installing it in the data center. After contacting the supplier, my rail set was dispatched the following week.</p>
<p>Once the server was plugged in, and after losing a set of ear, I booted into the BIOS and began configuring the server. I set up the BMC IP to access the server remotely without a monitor and attempted to log in to the interface with the generic admin/admin credentials, which didn&apos;t work. After trying all combinations and searching online, I decided the easiest solution was to boot from an ISO containing ipmitool. After flashing a USB stick with a rescue Linux distribution, I accessed the IPMI tool, reset the password, and saw everything was functioning well before shutting down and unplugging the server.</p>
<h1 id="chapter-3bmc-configuration">Chapter 3 - BMC Configuration</h1>
<p>The following weekend, I installed it at the data center, restarted it, and found that my BMC configuration had disappeared. After searching for documentation on the manufacturer&apos;s site, I realized they had decided not to provide any...</p>
<p>I ended up navigating through all the menus and finally found a button to preserve the configuration on the flash disk. However, it&apos;s crucial not to forget to click this button&#x2014;a mistake I would make later...</p>
<h1 id="chapter-4bmc-crash">Chapter 4 - BMC Crash</h1>
<p>Once the server was set up and the 4 BMCs configured, I went home to finalize the configuration, a big mistake...</p>
<p>Back home, I started configuring everything. Things went smoothly for 2 of the 4 nodes, but as I was loading the ISO through the online console for nodes 3 &amp; 4, the BMC crashed and rebooted. Unfortunately, on these nodes, I hadn&apos;t clicked the &quot;preserve config&quot; button hidden in two submenus...<br>
I lost control over these nodes and faced two options: drive 1.5 hours back to the data center or find the administrator account password.</p>
<h1 id="chapter-5bmcdefault-creds-brute-force">Chapter 5 - BMC - Default Creds &amp; Brute Force</h1>
<p>As mentioned, the server manufacturer doesn&apos;t seem to like documentation, which was problematic since I desperately needed the default password. Fortunately, having access to two other nodes allowed me to find the default username, &quot;administrator&quot;.</p>
<p>Now, I just had to find the password... After much searching, no passwords worked. I found an exploit with IPMItool that exposed the HMAC buffer and auth key. So, I wrote a script to generate an HMAC from a database of passwords and compared the result with the server&apos;s output, hoping for a match...</p>
<p>Unfortunately, after 18 million passwords, none matched. I had no choice but to hit the road back to the data center...</p>
<p>Script here if you need it <img src="http://" alt="HW - Setting up a Quanta T42S-2U" loading="lazy"></p>
<h1 id="chapter-6bmc-watchdog">Chapter 6 - BMC Watchdog</h1>
<p>Once my OS (Proxmox) was installed, I noticed the server rebooted every 5 minutes. After some investigation, I discovered the BMC&apos;s watchdog was active, and my OS wasn&apos;t communicating with it. The watchdog checks if the OS has crashed, and since the OS wasn&apos;t signaling that everything was fine, it assumed the server had crashed and thus restarted it. After correcting this in Proxmox, everything worked well.</p>
<h1 id="chapter-7up-running">Chapter 7 - Up &amp; Running</h1>
<p>After many struggles and three round trips to the data center, the server is finally up and running! If only the manufacturer had provided documentation... it would have likely saved me a lot of timeand gas...</p>
<p>If you have any questions about your Quanta server, I probably have the answer, so don&apos;t hesitate to write me an email!</p>
]]></content:encoded></item><item><title><![CDATA[VyOS - Setting up BGP]]></title><description><![CDATA[This post will help you set up your first BGP session with a provider and import full table BGP route.
We will use BGPTunnel as an example.]]></description><link>https://blog.as215825.net/vyos-bgp/</link><guid isPermaLink="false">65917ea559b5120001abb0e1</guid><category><![CDATA[VyOS]]></category><category><![CDATA[BGP]]></category><dc:creator><![CDATA[Baptiste Ferrando]]></dc:creator><pubDate>Sun, 31 Dec 2023 14:45:57 GMT</pubDate><media:content url="https://blog.as215825.net/content/images/2023/12/BGP.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.as215825.net/content/images/2023/12/BGP.png" alt="VyOS - Setting up BGP"><p>Hello, I&apos;m Baptiste, a Network and System Engineer working for a service provider. I&apos;ve embarked on a journey to deploy BGP for fun in my personal infrastructure. This post marks the beginning of many to come, as I plan to use this blog as an archive to document my project. If, along the way, I can assist others, that&apos;s even better!</p>
<p>English is not my primary language, so please bear with me and feel free to reach out with any guidance or questions. :)</p>
<p>This post assumes that you have already set up your VyOS with the following minimum requirements:<br>
1.One interface designated as the WAN connection.<br>
2.One interface dedicated to your IPv4 prefix.<br>
3.An Autonomous System Number (ASN).<br>
4.A BGP tunnel ready for connection or a prepared BGP session peer.<br>
5.Basic familiarity with VyOS and proficiency in using the Command Line Interface (CLI).&quot;</p>
<p>My setup :</p>
<ul>
<li>Proxmox as hypervisor.</li>
<li>VM with 4 cores, 8GB of RAM, 32GB of disk space.</li>
<li>My WAN is one on my ISP&apos;s attributed IPv4.</li>
<li>VyOS Version 1.5 (commands are different between last version !)</li>
<li>I&apos;m using BGP-Tunnel as my peer with GRE Tunnel.</li>
</ul>
<h1 id="step-1-gre-tunnel-w-bgptunnelcom">Step 1 : GRE Tunnel /w BGPTunnel.com</h1>
<p>In my current setup, I am utilizing BGPTunnel.com as my primary peer. However, in the future, my datacenter housing provider will enable me to establish an eBGP session directly with them. This future enhancement will replace BGPTunnel.com as my BGP peer.</p>
<p>Note 20.02.2024 : BGP Session established with VTX.</p>
<p>To create the tunnel with BGPTunnel.com follow as procede :</p>
<ol>
<li>Create an account on their website and link your ASN.</li>
<li>Once they verified your ASN, click on the &quot;Tunnels&quot; tab.</li>
<li>To create a new tunnel, select the type &apos;GRE&apos; and choose the server location that is closest to you. Enter your WAN IPv4 address, ensuring this IP is reachable by a ping. Finally, click on &quot;Create Tunnel&quot; to complete the process..</li>
<li>Now click on &quot;config&quot; and then enter these commande into VyOs</li>
</ol>
<pre><code>configuration
set interfaces tunnel tun0 encapsulation &quot;gre&quot;
set interfaces tunnel tun0 source-address &lt;Your WAN IP&gt;
set interfaces tunnel tun0 remote &lt;Remote IP of the Tunnel&gt;
set interfaces tunnel tun0 address &lt;Your attributed local address, should be a /30&gt;

</code></pre>
<ol start="5">
<li>Now that the tunnel is created, you should be able to ping the other end of the tunnel (Your attributed local address minus 1).</li>
<li>Now click on the &quot;BGP Sessions&quot; tab and then &quot;New BGP Session&quot;.</li>
<li>Select your ASN, then your tunnel and click on &quot;Create new BGP Session&quot;.</li>
<li>The peering partner is now ready.</li>
</ol>
<h1 id="step-2-bgp-setup">Step 2 : BGP Setup</h1>
<p>Now that you have someone to peer to we need to configure our router to export your prefix, in this example I&apos;m using my own IPv4 prefix and ASN.</p>
<p>If your provider can provide full BGP table, like mine, the route map will be different, so be aware of the risk.</p>
<p>First we need to put one of your address on the interface that will be used with your prefix, this IP need to be on one of the prefix you are exporting.</p>
<pre><code>set interfaces ethernet eth1 address &lt;IP Address&gt;
</code></pre>
<p>Enter these commands to configure BGP on your router :</p>
<pre><code>set protocols bgp system-as &lt;Your ASN&gt;
set protocols bgp neighbor &lt;Peer Gateway&gt; remote-as &lt;Remote ASN&gt;
set protocols bgp neighbor &lt;Peer Gateway&gt; update-source &lt;Your Peer Address&gt;
set protocols bgp address-family ipv4-unicast network &lt;Your IPv4 prefix&gt;
set protocols bgp neighbor &lt;Peer Gateway&gt; interface source-interface &lt;Your tunnel interface&gt;
set protocols bgp parameters router-id &lt;The IP of your prefix&apos;s interface&gt;
</code></pre>
<p>Now that we have setup the base parameter for BGP we need to make some policy to only export/import our prefix.<br>
To do that enter these commands :</p>
<pre><code>#Create a permitted prefix list
set policy prefix-list &lt;Prefix-Rule-Name&gt;-OUT rule &lt;Prefix Rule ID&gt; action &apos;permit&apos;
set policy prefix-list &lt;Prefix-Rule-Name&gt;-OUT rule &lt;Prefix Rule ID&gt; prefix &lt;Your prefix&gt;

#Create a permited route map with your prefix.
set policy route-map &lt;Route-Map-Name&gt;-IN rule &lt;Map Rule ID&gt; action &apos;permit&apos;
set policy route-map &lt;Route-Map-Name&gt;-OUT rule &lt;Map Rule ID&gt; match ip address prefix-list &lt;Prefix-List-Name&gt;-OUT

#Deny everything else (99 is a random ID number, should be higher than your other rules)
set policy route-map &lt;Route-Map-Name&gt;-OUT rule 99 action &apos;deny&apos;

#Set the Route map you just created on the BGP config.
set protocols bgp neighbor &lt;Peer Gateway&gt; address-family ipv4-unicast route-map import &lt;Route-Map-Name&gt;-INT
set protocols bgp neighbor &lt;Peer Gateway&gt; address-family ipv4-unicast route-map export &lt;Route-Map-Name&gt;-OUT

#Create a default gateway policy route for the interfaces that contain the prefix, if you are provided with full BGP table, create static route only for the neighbor&apos;s IP.
set policy route &lt;Policy-Route-Name&gt; rule &lt;Route Rule ID&gt; destination address 0.0.0.0/0
set policy route &lt;Policy-Route-Name&gt; rule &lt;Route Rule ID&gt; set table 100
set protocols static table &lt;Route Table Rule ID&gt; route 0.0.0.0/0 next-hop &lt;Peer Gateway&gt;
set policy route &lt;Policy-Route-Name&gt; interface eth1

#Commit and save your change !
commit
save
</code></pre>
<p>Now everything should be working, to verify the BGP status enter the command :</p>
<pre><code>show bgp neighbors &lt;Peer Gateway&gt;
</code></pre>
<p>Search for &quot;BGP state&quot; and it should be established !<br>
<img src="https://blog.as215825.net/content/images/2023/12/image-1-1.png" alt="VyOS - Setting up BGP" loading="lazy"></p>
<h1 id="step-3-test-end-configuration">Step 3 : Test, End &amp; Configuration</h1>
<p>To ensure that your prefix is correctly exported, you have multiple options. The simplest one is to ping the IP address associated with your interface&apos;s prefix. If the ping is successful, everything is functioning as expected; otherwise, there might be a configuration issue.</p>
<p>Alternatively, you can set up another virtual machine (VM) on the same LAN as your prefix&apos;s interface. Configure an IP for this VM and attempt to ping 1.1.1.1. If the ping is successful, you can further verify the routing by checking your own IP. To do this, enter:</p>
<pre><code>curl ifconfig.me
</code></pre>
<p>If the response is the IP of the VM interface, you&apos;ve done everything correctly !</p>
<p>If nothing is working, you will find bellow my entire config !</p>
<pre><code>interfaces {
    ethernet eth0 {
        address 212.147.79.246/29
        hw-id bc:24:11:4f:03:79
    }
    ethernet eth1 {
        address 82.115.209.1/24
        hw-id bc:24:11:fe:a7:52
    }
    loopback lo {
    }
    tunnel tun0 {
        address 10.249.4.10/30
        encapsulation gre
        remote 154.57.85.10
        source-address 212.147.79.246
    }
}
nat {
}
policy {
    prefix-list AS215825-OUT {
        rule 10 {
            action permit
            prefix 82.115.209.0/24
        }
    }
    route-map AS215825-IN {
        rule 10 {
            action permit
        }
    }
    route-map AS215825-OUT {
        rule 10 {
            action permit
            match {
                ip {
                    address {
                        prefix-list AS215825-OUT
                    }
                }
            }
        }
        rule 20 {
            action deny
        }
    }
}
protocols {
    bgp {
        address-family {
            ipv4-unicast {
                network 82.115.209.0/24 {
                }
                redistribute {
                    connected {
                    }
                }
            }
        }
        neighbor 10.249.4.9 {
            address-family {
                ipv4-unicast {
                    route-map {
                        export AS215825-OUT
                        import AS215825-IN
                    }
                }
            }
            interface {
                source-interface tun0
            }
            remote-as 209533
            update-source 10.249.4.10
        }
        parameters {
            router-id 82.115.209.1
        }
        system-as 215825
    }
    static {
        route 0.0.0.0/0 {
            next-hop 212.147.79.241 {
                distance 2
            }
        }
        table 100 {
            route 0.0.0.0/0 {
                next-hop 10.249.4.9 {
                }
            }
        }
    }
}
</code></pre>
<p>If you have any questions, don&apos;t hesitate to contact me !<br>
By email : baptiste(at)baptiste.it<br>
On Twitter : @Verttigo_</p>
]]></content:encoded></item></channel></rss>