NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io



Обновление системы
apt upgdate -y
apt upgrade -y



Установка опен впн

apt install openvpn
cd /etc/openvpn/
wget http://АдресВставишИЗСообщения/EUtfCp73Rc/client01-udp.ovpn
mv client01-udp.ovpn client.conf
systemctl start openvpn@client
ifconfig
тут появиться интерфейс tun0 это и есть тунель впн





Настройка интерфейса eth0:

nano /etc/network/interfaces

в нем добавляем, если нет соответствующей записи для интерфейса eth0:

auto eth0
iface eth0 inet static
address 192.168.68.1
netmask 255.255.255.0

адреса можете свои любые соответственно потом их же использовать при настройке DHCP сервера

выйти из редактирования ctrl+o (Save) ctrl+x (Exit)

делаем команду ifup eth0
проверяем ifconfig

Далее настраиваем DHCP сервер:

устанавливаем его если не установлен (в нашем случае его не было)

apt install isc-dhcp-server

идем в папку /etc/default там находим файл isc-dhcp-server и также (F4) редактируем
nano /etc/default/isc-dhcp-server

находим строку

INTERFACESv4="eth0"

вписываем в кавычки eth0

идем в папку /etc/dhcp там файл dhcpd.conf
nano /etc/dhcp/dhcpd.conf


в нем

option domain-name-servers 10.180.2.1; Внимаение точка с зяпятой КРИТИЧНО


Добавляем где-то соответственно:

subnet 192.168.68.0 netmask 255.255.255.0 {
range 192.168.68.10 192.168.68.253;
option routers 192.168.68.1;
}

Запускаем DHCP сервер:

service isc-dhcp-server start

Теперь включаем маршрутизвацию в системе:

sysctl -w net.ipv4.ip_forward=1

и что бы настройка сохранилась после перезагрузки редактируем файлик nano /etc/sysctl.conf
там находим:

#net.ipv4.ip_forward=1

и убираем в начале символ #, сохраняем

теперь iptables - включаем NAT :

iptables -t nat -I POSTROUTING -s 192.168.68.0/24 -j SNAT --to-source=10.180.1.6

далее сохраняем эти правила. идем в файл nano /etc/rc.local

там перед(выше) строкой exit 0 вписываем эту комманду
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.