MYCSS

Показ дописів із міткою network. Показати всі дописи
Показ дописів із міткою network. Показати всі дописи

2025-06-21

Docker Port Is Busy on Windows? Fix for: bind: An attempt was made to access a socket in a way forbidden by its access permission.

If you're getting a Docker error like:

(HTTP code 500) server error - ports are not available: exposing port TCP 0.0.0.0:8182 -> 127.0.0.1:0: listen tcp 0.0.0.0:8182: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
But nothing is using the port, it’s likely because Windows has excluded the port dynamically, especially after Docker was previously using it. 
 
(HTTP code 500) server error - ports are not available

1. Verify Nothing Is Listening on the Port

netstat -aon | findstr :8181

If you see no output, the port is not in use by any application.

2. Check Excluded Port Ranges:

netsh interface ipv4 show excludedportrange protocol=tcp

Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
      6575        6674
      7162        7261
      7262        7361
      7362        7461
      7462        7561
      7562        7661
      7681        7780
      7781        7880
      7881        7980
      7981        8080
      8081        8180
      8181        8280
      8281        8380
      8381        8480
      8481        8580
     30604       30703
     49690       49789
     49790       49889
     49890       49989
     50000       50059     *
     50160       50259
     50360       50459
     50460       50559
     50660       50759
     50760       50859
     50860       50959
     51064       51163
     51243       51342
     51344       51443

You’ll notice 8182 falls within the 8181–8280 range - without a * at the end, meaning it's a dynamically excluded port.

You cannot remove dynamic exclusions manually.

3. Restart winnat Service to Clear Dynamic Exclusions: 

This step clears dynamic port reservations created by services like Docker: 
net stop winnat
net start winnat

* Run the above in Administrator Command Prompt 

 

4. Recheck Excluded Ports:

netsh int ipv4 show excludedportrange protocol=tcp

Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
     50000       50059     *

* - Administered port exclusions.

If 8182 is no longer in the list, you're good to go.

2024-09-21

Note. Restore the old physical server by moving it to a virtual machine on the Proxmox VE. Creating an iSCSI disk and mounting it at boot. FreeBSD 9.0.

Примітка. Відновлення старого фізичного сервера, перемістивши його на віртуальну машину на Proxmox VE. Створення iSCSI диску та його монтування при завантажені операційної системи. FreeBSD 9.0.

Історія

Основне правило адміністратора, працює не чіпай. Призводить то того що рано чи пізно це вилазить боком. На кшталт не можеш нічого оновити та встановити.

Тому мені історично діставався цей сервер котрий треба перемістити до віртуального середовища поки "/raid1" масив ще працює після нового його збою, але варто зауважити міцний горішок.

Є декілька способів як перемістити систему з фізичного до віртуального. Але я не хотів переносити усі накопиченні проблеми, і вирішив перенести все окрім ядра та базової системи використовуючи    rsync.

2024-06-20

Simple basic setup of SONiC OS for swicth Celestica Seastone DX010, 32-port 100G in L2 mode, and simple ACL restriction for SSH managemnt.

In continuing to Hardware switch with stateless firewall rules. Seastone DX010. SONiC OS, SONiC Notebook.

Conditions. Two Celestica DX010 switches (Celestica1, Celestica2) are connected via a 100G (4x25G) uplink connection located in different data centres.

Task. Manage the settings of the Celestica2 from the console of the Celestica1 switch, but not vice versa.

Upgrade firmware from WiKi

SONiC / Supported devices platforms - Celestica DX010 #37
 
$ scp ./sonic-broadcom.bin scp://admin@sonic_ip
$ ssh admin@sonic_ip admin@sonic:~$ sudo sonic-installer install sonic-broadcom.bin
New image will be installed, continue? [y/N]: y
efi not supported - exiting without verification

Installing image SONiC-OS-master.576207-99e0e1ade and setting it as default...
Setup SWAP memory
Command: mkswap /host/swapfile
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=c7e49ce7-321d-4a01-9af6-09123874b547

Command: swapon /host/swapfile

Command: bash ./sonic-broadcom.bin
Verifying image checksum ... OK.
Preparing image archive ... OK.
Installing SONiC in SONiC
ONIE Installer: platform: x86_64-broadcom-r0
onie_platform: x86_64-cel_seastone-r0
Removing old SONiC installation /host/image-master.571486-a2b3ca87a
Installing SONiC to /host/image-master.576207-99e0e1ade
....
Command: sync

Command: sync

Command: sync

Command: sleep 3

Done
admin@sonic:~$ sudo reboot
Now the user is admin, password: "YourPaSsWoRd".
Managemnet sonic_ip is obtained from the local DHCP server.

You can back up the sonic configuration on your local PC
$ scp -r admin@sonic_ip:/etc/sonic/ ./sonic

2024-04-25

SONiC Notebook

Software for Open Networking in the Cloud (SONiC)

This repository contains documentation, Wiki, master project management, and website for the Software for Open Networking in the Cloud (SONiC).

Documentation covers project wide concerns such as the getting started guide, faq, general requirements for contribution, developer's guide, governance, architecture, and so on. It also contains links to download and install SONiC and links to all the source. See SONiC Wiki for complete information.

2023-08-14

Full course : Google Cybersecurity Professional Certificate. Put It to Work: Prepare for Cybersecurity Jobs - Completed on Aug 6, 2023

Ось і 8-й курс "Put It to Work: Prepare for Cybersecurity Jobs" з 8-ми курсів за напрямком Google Cybersecurity Professional Certificate на платформі Coursera та за підтримки (2022-2023 UA Prometheus)  - успішно завершено. За що отримано підсумковий сертифікат за всі 8 курсів.

Google Cybersecurity Professional Certificate

Google Cybersecurity Certificate Issued by Coursera (Credly)


Put It to Work: Prepare for Cybersecurity Jobs

Google Cybersecurity Professional Certificate - Put It to Work: Prepare for Cybersecurity Jobs

 About course

  • Determine when and how to escalate a security incident

  • Engage with the cybersecurity community

  • Find and apply for cybersecurity jobs

  • Prepare for job interviews


SKILLS YOU WILL GAIN

2023-07-24

Google Cybersecurity Professional Certificate - Tools of the Trade: Linux and SQL - Completed on July 24, 2023

Ось це 4-й курс "Tools of the Trade: Linux and SQL" за напрямком Google Cybersecurity Professional Certificate на платформі Coursera та за підтримки (2022-2023 UA Prometheus)  - успішно завершено.

Google Cybersecurity Professional Certificate - Tools of the Trade: Linux and SQL
 

Google Cybersecurity Professional Certificate - Connect and Protect: Networks and Network Security - Completed on July 23, 2023

Ось це 3-й курс "Connect and Protect: Networks and Network Security" за напрямком Google Cybersecurity Professional Certificate на платформі Coursera та за підтримки (2022-2023 UA Prometheus)  - успішно завершено.

Google Cybersecurity Professional Certificate - Connect and Protect: Networks and Network Security

2023-07-07

Історія створеної локальної мережі до того як офіс розбомбили...

Мережа

Після того як літня гроза в котре вивела з ладу мережеве обладнання, мережу приревнували  на основі таких комутаторів.

T2600G-28TS (TL-SG3424).

Брав ще за 5000 грн.

2023-06-17

Нотатка для себе. Використання TCP IP round robin для ffmpeg за допомогою SQUID Proxy

Умови

  • Задача балансувати зовнішнє підключення програми ffmpeg за допомогою пулу різних IP адрес.
  • Firewall server з встановленим Squid. У мене це сервер "pfSense+". 
  • Мережа реальних IP адрес  /24.

 

pfSense+ Virtual IP

Налаштовую на інтерфейсі додаткові зовнішні адреси як Аліаси або Virtual IPs у pfSense. Це десять  реальних  IP.

Virtual IPs у pfSense

2023-05-13

Нотатка. Монтування дисків NFS, ZFS поверх iSCSI. FreeBSD rc.d.

Є підключення диска через iSCSI, надалі диск форматується у ZFS. При завантаженні системи потрібно зачекати мережевого з'єднання iSCSI Initiatior з iSCSI target. Потім, змотувати ZFS pool. Потім запустити hook скрипт, після успішного монтування.  

source imgage : https://www.data-storage.uk
iSCSI Storage

iSCSI

/etc/rc.conf:

#iSCSI
iscsid_enable="YES"
iscsictl_enable="YES"
iscsictl_flags="-Aa"
/etc/iscsi.conf:
t0 {
    TargetAddress   = nas1
    TargetName      = iqn.2023-05.net.server.nas1:server1-storage
    AuthMethod      = CHAP
    chapIName       = server1
    chapSecret      = "kdwkjdqhdww3qq@@6td3_3eiw9e7w43"
}

ZFS: 

/etc/rc.conf:

#iSCSI_ZFS
iscsi_zfs_enable="YES"
iscsi_zfs_wait_iqn="server1-storage"
iscsi_zfs_wait_pool="storage"
iscsi_zfs_post_hook="/root/script/post-mount.sh"
iscsi_zfs_pre_hook="/root/script/pre-umount.sh"

2021-05-25

Нотатка для себе. SR-IOV VLAN Linux Proxmox

Для використання в віртуальних машинах у Proxmox віртуальних мережевих інтерфейсів.

Пристрої SR-IOV можуть спільно використовувати один фізичний порт з кількома віртуальними машинами.

Віртуальні функції мають майже рідну продуктивність і забезпечують кращу продуктивність, ніж паравіртуалізовані драйвери та емуляційний доступ. Віртуальні функції забезпечують захист даних між віртуальними машинами на тому ж фізичному сервері, коли дані управляються та контролюються апаратним забезпеченням.

How SR-IOV works

16.2. PCI Device Assignment with SR-IOV Devices Red Hat Enterprise Linux 7

Advantages of SR-IOV

SR-IOV devices can share a single physical port with multiple virtual machines.
When an SR-IOV VF is assigned to a virtual machine, it can be configured to (transparently to the virtual machine) place all network traffic leaving the VF onto a particular VLAN. The virtual machine cannot detect that its traffic is being tagged for a VLAN, and will be unable to change or eliminate this tagging.
Virtual Functions have near-native performance and provide better performance than paravirtualized drivers and emulated access. Virtual Functions provide data protection between virtual machines on the same physical server as the data is managed and controlled by the hardware.
These features allow for increased virtual machine density on hosts within a data center.
SR-IOV is better able to utilize the bandwidth of devices with multiple guests.  

2021-02-09

Нотатка: Забезпечити безпечне мережеве з'єднання між двома офісами і віддаленим користувачем через OpenVPN

Задача

Забезпечити безпечне мережеве з'єднання між двома офісами і віддаленим користувачем.

Умови

  • Головний офіс (Office 1) має білій IPv4 до якого можуть підключатися клієнти, локальна мережа 10.0.1.0/24.
  • Віддалений офіс (Office 2) має підключення за NAT маршрутизатором, тому до нього підключитися не можливо за IPv4, але він може підключатися будь куди, локальна мережа 10.1.2.0/24.
  • Віддалений користувач за звичай за домашнім WiFi маршрутизатором з IPv4 та NAT, до нього підключитися не можливо за IPv4, але він може підключатися будь куди.
  • Офіси мають в локальний мережі програмний сервер маршрутизатор pfSense.

Вирішення

  • Підключити віддалений офіс (Office 2) до головного офісу (Office 1), за допомогою технології VPN.
  • Підключити віддаленого користувача до головного офісу (Office 1) та забезпечити доступ до локальної мережі обох офісів Office 1 та Office 2.

За даних умов вибирається VPN підключення на базі сервера OpenVPN, через підключення UDP IPv4.

Схематично план підключення зображено на малюку.

OpenVPN client - OpenVPN client

2020-10-22

Підключення до консолі віртуальних машин Hyper-V через RDP

.rdp

Для цього треба ввімкнути розширений режим (Enhanced Session Mode (ESM)),  у налаштуваннях Hyper-V 

налаштування Hyper-V

Локальне підключення до консолі віртуальної машини виглядає так:

Консоль  VM "MEDOC"

2019-05-24

Script for change interface bridge members to be private


При створенні віртуальних середовищ використовуючи jails FreeBSD , наприклад у FreeNAS,
стала задача ізолювати створенні jails у локальному сегменті мережі.
Так FreeNAS для створення jails почав використовувати пакунок 'iocage', що досить ефективно автоматизує роботу з jails.
Результатом роботи  у мене створенні декілька jails котрі ізольовані в окрему мережу котра  використовує VLAN.
Результатом є створення мережевого моста bridge до котрого додані члени jails і інтерфейс роутера.

2019-02-26

Глюк з FreeBSD 12, та мережевих карт Intel (em).

Після оновлення FreeBSD власники мережевих карт Intel (em) можуть не побачити свої мережеві інтерфейси після перезавантаження.

 
dmesg
em0: <Intel(R) PRO/1000 Network Connection> port 0xc000-0xc01f mem 0xfe800000-0xfe81ffff,0xfe820000-0xfe823fff irq 46 at device 0.0 on pci3
em0: attach_pre capping queues at 1
em0: using 1024 tx descriptors and 1024 rx descriptors
em0: msix_init qsets capped at 1
em0: pxm cpus: 8 queue msgs: 0 admincnt: 1
em0: using 0 rx queues 0 tx queues
em0: Using MSIX interrupts with 1 vectors
em0: allocated for 0 tx_queues
em0: allocated for 0 rx_queues
em0: failed to allocate IRQ for rid 0, name irq0.
em0: iflib_legacy_setup failed 12
device_attach: em0 attach returned 12

Поки виправляється цей баг, то можна застосувати це:
Adding hw.pci.enable_msix=0 to /boot/loader.conf and rebooting fixed it for me. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235147#c8  

Мені це допомогло.


Коли забув ти рідну мову, біднієш духом ти щодня...
When you forgot your native language you would become a poor at spirit every day ...

Д.Білоус / D.Bilous
Рабів до раю не пускають. Будь вільним!

ipv6 ready