Skip to content

Commit 3ed9829

Browse files
committed
IP Privada Fija en Linux
Signed-off-by: Alejandro Alfaro Sánchez <alejandroalsa@diwes.es>
1 parent 97c5f58 commit 3ed9829

5 files changed

Lines changed: 185 additions & 89 deletions

File tree

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ title: ΛLΣJΛПDЯOΛLSΛ # the main title
1919
tagline: Fundador & CEO de DIWES + HWH # it will display as the subtitle
2020

2121
description: >- # used by seo meta and the atom feed
22-
A minimal, responsive and feature-rich Jekyll theme for technical writing.
22+
Blog técnico especializado en desarrollo de software, servidores, redes, hardware y todo lo relacionado con la Ingeniería Informática.
2323
2424
# Fill in the protocol & hostname for your site.
2525
# E.g. 'https://username.github.io', note that it does not end with a '/'.
@@ -116,7 +116,7 @@ comments:
116116
issue_term: # < url | pathname | title | ...>
117117
# Giscus options › https://giscus.app
118118
giscus:
119-
repo: alejandroalsa/alejandroalsa.es # format: <gh-username>/<repo>
119+
repo: alejandroalsa/alejandroalsa.github.io # format: <gh-username>/<repo>
120120
repo_id: R_kgDOJ8ORRA
121121
category: General
122122
category_id: DIC_kwDOJ8ORRM4Cbi1j

_posts/2025-12-07-introduccion-a-jekyll.md

Lines changed: 0 additions & 84 deletions
This file was deleted.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: IP Privada Fija en Linux
3+
date: 2023-07-16 12:00:00 +0800
4+
categories: [Linux, Servidores, Redes]
5+
tags: [ip-privada-fija]
6+
---
7+
8+
Configurar una IP privada fija en Linux permite que tu servidor o equipo tenga siempre la misma dirección en la red local, facilitando el acceso remoto, la gestión de servicios y la asignación de reglas en routers o firewalls.
9+
10+
## 1. Identificar la interfaz de red
11+
12+
Primero, debes conocer el nombre de la interfaz de red que deseas configurar. Para ello, puedes ejecutar:
13+
14+
```bash
15+
ip -o link show | awk -F': ' '{print $2}'
16+
```
17+
18+
Esto mostrará una lista de todas las interfaces de red, por ejemplo: `eth0`, `enp0s3`, `ens33`, etc.
19+
20+
> Alternativa rápida: `ls /sys/class/net` también lista todas las interfaces disponibles.
21+
{: .prompt-tip }
22+
23+
## 2. Editar la configuración de Netplan
24+
25+
En distribuciones modernas de Ubuntu y otras basadas en systemd, la configuración de red se maneja con Netplan, cuyos archivos se encuentran en `/etc/netplan/`{: .filepath} y tienen extensión `.yaml`.
26+
27+
Abre el archivo que corresponda con privilegios de superusuario:
28+
29+
```bash
30+
sudo nano /etc/netplan/file_name.yaml
31+
```
32+
33+
A continuación, modifica el archivo para asignar una IP fija. Ejemplo:
34+
35+
```yaml
36+
network:
37+
ethernets:
38+
eth0: # Nombre de la interfaz a configurar
39+
dhcp4: no # Desactivar DHCP
40+
addresses: [10.10.10.10/24] # Dirección IP fija + máscara de subred
41+
gateway4: 10.10.10.1 # Puerta de enlace (gateway)
42+
nameservers:
43+
addresses: [1.1.1.1, 8.8.8.8] # Servidores DNS
44+
version: 2
45+
```
46+
{: file='/etc/netplan/file_name.yaml'}
47+
48+
> Notas importantes:<br>
49+
Cambia `eth0` por el nombre de tu interfaz.<br>
50+
Ajusta la dirección IP, máscara y gateway según tu red.<br>
51+
Puedes agregar múltiples servidores DNS si lo deseas.
52+
{: .prompt-info }
53+
54+
### Archivo por defecto de Netplan
55+
56+
Normalmente, el archivo por defecto se ve así:
57+
58+
```yaml
59+
network:
60+
ethernets:
61+
enp0s3:
62+
dhcp4: true
63+
version: 2
64+
```
65+
{: file='/etc/netplan/file_name.yaml'}
66+
67+
## 3. Aplicar los cambios
68+
69+
Después de guardar el archivo, ejecuta:
70+
71+
```bash
72+
sudo netplan apply
73+
```
74+
75+
Esto aplicará la nueva configuración sin necesidad de reiniciar el sistema.
76+
77+
Para asegurarte de que la IP se ha asignado correctamente, ejecuta:
78+
79+
```bash
80+
ip a show eth0
81+
```
82+
83+
Reemplaza `eth0` por tu interfaz. Deberías ver la IP fija asignada bajo `inet`.
84+
85+
Con estos cambios ya tendrás configurada la IP Privada Fija.

_tabs/about.md

Lines changed: 98 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,103 @@
11
---
2-
# the default layout is 'page'
2+
title: Alejandro Alfaro Sánchez
3+
author: Alejandro Alfaro Sánchez
4+
date: 2025-12-07 21:00:00 +0800
35
icon: fas fa-info-circle
46
order: 4
7+
hide_title: true
58
---
69

7-
> Add Markdown syntax content to file `_tabs/about.md`{: .filepath } and it will show up on this page.
8-
{: .prompt-tip }
10+
<img src="/assets/img/alejandroalsa_icon.webp" alt="LOGO" width="128" style="display:block; margin: 0 auto;">
11+
12+
<h1 align="center"><b>ΛLΣJΛПDЯOΛLSΛ</b></h1>
13+
14+
<p align="center">Blog técnico especializado en desarrollo de software, servidores, redes, hardware y todo lo relacionado con la Ingeniería Informática.</p>
15+
16+
<p align="center" style="display: flex; justify-content: center; gap: 10px; align-items: center;">
17+
<a href="https://x.com/alejandroalsa_x" target="_blank">
18+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path fill="#0A66C2" d="M218.123 218.127h-37.931v-59.403c0-14.165-.253-32.4-19.728-32.4c-19.756 0-22.779 15.434-22.779 31.369v60.43h-37.93V95.967h36.413v16.694h.51a39.91 39.91 0 0 1 35.928-19.733c38.445 0 45.533 25.288 45.533 58.186zM56.955 79.27c-12.157.002-22.014-9.852-22.016-22.009s9.851-22.014 22.008-22.016c12.157-.003 22.014 9.851 22.016 22.008A22.013 22.013 0 0 1 56.955 79.27m18.966 138.858H37.95V95.967h37.97zM237.033.018H18.89C8.58-.098.125 8.161-.001 18.471v219.053c.122 10.315 8.576 18.582 18.89 18.474h218.144c10.336.128 18.823-8.139 18.966-18.474V18.454c-.147-10.33-8.635-18.588-18.966-18.453"/></svg>
19+
</a>
20+
21+
<a href="https://linkedin.com/in/alejandro-alfaro-sanchez" target="_blank">
22+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 14 14"><g fill="none"><g clip-path="url(#IconifyId19afaed2a71f6d0cf1)"><path fill="#ffffff" d="M11.025.656h2.147L8.482 6.03L14 13.344H9.68L6.294 8.909l-3.87 4.435H.275l5.016-5.75L0 .657h4.43L7.486 4.71zm-.755 11.4h1.19L3.78 1.877H2.504z"/></g><defs><clipPath id="IconifyId19afaed2a71f6d0cf1"><path fill="#fff" d="M0 0h14v14H0z"/></clipPath></defs></g></svg>
23+
</a>
24+
</p>
25+
26+
<h2 align="center">💻 Tech Stack:</h2>
27+
<div align="center">
28+
<img src="https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css&logoColor=white" alt="CSS3">
29+
<img src="https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white" alt="HTML5">
30+
<img src="https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E" alt="JavaScript">
31+
<img src="https://img.shields.io/badge/php-%23777BB4.svg?style=for-the-badge&logo=php&logoColor=white" alt="PHP">
32+
<img src="https://img.shields.io/badge/laravel-%23FF2D20.svg?style=for-the-badge&logo=laravel&logoColor=white" alt="Laravel">
33+
<img src="https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white" alt="TailwindCSS">
34+
<img src="https://img.shields.io/badge/bootstrap-%23563D7C.svg?style=for-the-badge&logo=bootstrap&logoColor=white" alt="Bootstrap">
35+
<img src="https://img.shields.io/badge/vue-%2335495e.svg?style=for-the-badge&logo=vue.js&logoColor=4FC08D" alt="Vue.js">
36+
<img src="https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white" alt="Docker">
37+
<img src="https://img.shields.io/badge/mongodb-%2347A248.svg?style=for-the-badge&logo=mongodb&logoColor=white" alt="MongoDB">
38+
<img src="https://img.shields.io/badge/ansible-%231A1918.svg?style=for-the-badge&logo=ansible&logoColor=white" alt="Ansible">
39+
<img src="https://img.shields.io/badge/proxmox-%23E53E3E.svg?style=for-the-badge&logo=proxmox&logoColor=white" alt="Proxmox">
40+
<img src="https://img.shields.io/badge/linux-FCC624?style=for-the-badge&logo=linux&logoColor=black" alt="Linux">
41+
<img src="https://img.shields.io/badge/bash-%23121011.svg?style=for-the-badge&logo=gnu-bash&logoColor=white" alt="Bash">
42+
<img src="https://img.shields.io/badge/ubuntu-E95420?style=for-the-badge&logo=ubuntu&logoColor=white" alt="Ubuntu">
43+
<img src="https://img.shields.io/badge/mysql-%2300f.svg?style=for-the-badge&logo=mysql&logoColor=white" alt="MySQL">
44+
<img src="https://img.shields.io/badge/mariadb-%234479A1.svg?style=for-the-badge&logo=mariadb&logoColor=white" alt="MariaDB">
45+
<img src="https://img.shields.io/badge/arduino-00979D?style=for-the-badge&logo=arduino&logoColor=white" alt="Arduino">
46+
<img src="https://img.shields.io/badge/raspberrypi-C51A4A?style=for-the-badge&logo=Raspberry-Pi&logoColor=white" alt="Raspberry Pi">
47+
<img src="https://img.shields.io/badge/figma-%23F24E1E.svg?style=for-the-badge&logo=figma&logoColor=white" alt="Figma">
48+
<img src="https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54" alt="Python">
49+
<img src="https://img.shields.io/badge/fastapi-009688?style=for-the-badge&logo=fastapi&logoColor=white" alt="FastAPI">
50+
51+
</div>
52+
53+
<h2 align="center">📊 GitHub Stats:</h2>
54+
<div align="center">
55+
<img src="https://github-readme-stats.vercel.app/api?username=alejandroalsa&theme=react&hide_border=false&include_all_commits=true&count_private=true" alt="GitHub Stats">
56+
<br/>
57+
<img src="https://github-readme-streak-stats.herokuapp.com/?user=alejandroalsa&theme=react&hide_border=false" alt="GitHub Streak Stats">
58+
<br/>
59+
<img src="https://github-readme-stats.vercel.app/api/top-langs/?username=alejandroalsa&theme=react&hide_border=false&include_all_commits=true&count_private=true&layout=compact" alt="Top Languages">
60+
</div>
61+
62+
[![Github activity graph](https://github-readme-activity-graph.vercel.app/graph?username=alejandroalsa&bg_color=1b1b1e&color=ffffff&line=1a5fb4&point=e5a50a&area=true&hide_border=true)](https://github.com/ashutosh00710/github-readme-activity-graph)
63+
64+
<h2 align="center">🏆 GitHub Trophies</h2>
65+
<div align="center">
66+
<img src="https://github-profile-trophy.vercel.app/?username=alejandroalsa&theme=onedark&no-frame=false&no-bg=false&margin-w=4" alt="GitHub Trophies">
67+
</div>
68+
69+
<h2 align="center">✍️ Random Dev Quote</h2>
70+
<div align="center">
71+
<img src="https://quotes-github-readme.vercel.app/api?type=horizontal&theme=dark" alt="Random Dev Quote">
72+
</div>
73+
74+
<h2 align="center">🔝 Top Contributed Repo</h2>
75+
<div align="center">
76+
<img src="https://github-contributor-stats.vercel.app/api?username=alejandroalsa&limit=5&theme=onedark&combine_all_yearly_contributions=true" alt="Top Contributed Repo">
77+
</div>
78+
79+
<h2 align="center">😂 Random Dev Meme</h2>
80+
<div align="center" id="meme-container">
81+
<img id="meme-img" src="" alt="Random Dev Meme" style="max-width:512px; border-radius:8px;">
82+
<p id="meme-title"></p>
83+
<button id="new-meme" style="margin-top:10px;">🔄 Otro meme</button>
84+
</div>
85+
86+
<script>
87+
async function fetchMeme() {
88+
const res = await fetch('https://meme-api.com/gimme/ProgrammerHumor');
89+
const data = await res.json();
90+
91+
const img = document.getElementById('meme-img');
92+
const title = document.getElementById('meme-title');
93+
94+
img.src = data.url;
95+
title.textContent = data.title;
96+
}
97+
98+
// Botón para cargar otro meme
99+
document.getElementById('new-meme').addEventListener('click', fetchMeme);
100+
101+
// Carga inicial
102+
fetchMeme();
103+
</script>

assets/img/alejandroalsa_icon.webp

8.54 KB
Loading

0 commit comments

Comments
 (0)