Network is unreachable astra linux

connect: Network is unreachable

There are probably lots of situation when this can happen, but this is a big mistery for me. Some tools can use the network just fine (wget, dig, apt-get, . ), but some tools are just failing (ping, traceroute, the browser, . ). For example, I can download a file with wget :

gonvaled@pegasus ~ » wget archive.ubuntu.com --2014-10-02 10:52:34-- http://archive.ubuntu.com/ Resolving archive.ubuntu.com (archive.ubuntu.com). 2001:67c:1360:8c01::18, 2001:67c:1360:8c01::19, 91.189.91.14, . Connecting to archive.ubuntu.com (archive.ubuntu.com)|2001:67c:1360:8c01::18|:80. connected. HTTP request sent, awaiting response. 200 OK Length: 671 [text/html] Saving to: ‘index.html.2’ 100%[========================================================================================================================================================>] 671 --.-K/s in 0s 2014-10-02 10:52:34 (30,8 MB/s) - ‘index.html.2’ saved [671/671] 
gonvaled@pegasus ~ » dig archive.ubuntu.com ; > DiG 9.9.5-3-Ubuntu > archive.ubuntu.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER 

But I can not ping the site (not because the site is not replying to pings, but because Network is unreachable ):

gonvaled@pegasus ~ » ping archive.ubuntu.com connect: Network is unreachable 
gonvaled@pegasus ~ » traceroute archive.ubuntu.com traceroute to archive.ubuntu.com (91.189.88.149), 30 hops max, 60 byte packets connect: Network is unreachable 
gonvaled@pegasus ~ » ifconfig eth0 eth0 Link encap:Ethernet HWaddr 2c:76:8a:e0:b0:6b inet addr:10.11.44.84 Bcast:10.11.255.255 Mask:255.255.0.0 inet6 addr: 2001:4dd0:fff4:11:2c3f:5f86:f975:579f/64 Scope:Global inet6 addr: fe80::2e76:8aff:fee0:b06b/64 Scope:Link inet6 addr: 2001:4dd0:fff4:11:2e76:8aff:fee0:b06b/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37502 errors:0 dropped:0 overruns:0 frame:0 TX packets:14119 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13558552 (13.5 MB) TX bytes:3533448 (3.5 MB) gonvaled@pegasus ~ » route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.11.0.0 * 255.255.0.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1000 0 0 eth0 

EDIT

There seem to be two things at play here: IPv6 and default gateway. Whenever I enable wlan, I get these routes:

gonvaled@pegasus ~ » route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.11.0.1 0.0.0.0 UG 0 0 0 wlan0 10.11.0.0 * 255.255.0.0 U 0 0 0 eth0 10.11.0.0 * 255.255.0.0 U 9 0 0 wlan0 link-local * 255.255.0.0 U 1000 0 0 eth0 
  1. Why don't I get a default gateway with my eth0? (this is the real issue at hand)
  2. Why does IPv6 does not need a default gateway? (this is what was confusing me all along)

Источник

openvpn химичит

пытаюсь настроить openvpn на astra linux. При настройке все шло нормально, даже что-то понимал, но при соединении по туннелю все пошло крахом. Помоги пожалуйста разобраться в проблеме и помочь ее решить.

файл server.conf dev tun ;режим работы L3-туннель port 1194 ;порт для OpenVPN proto udp ca /etc/openvpn/ca.crt ;корневой сертификат cert /etc/openvpn/server.crt ;сертификат сервера key /etc/openvpn/server.key ;приватный ключ сервера dh /etc/openvpn/dh1024.pem ;параметр Diffie Hellman'а topology subnet ;каждому клиенту выдается по 1 адресу server 10.8.0.0 255.255.255.0 ;10.8.0.1 выдается серверу следующие ;клиентам ifconfig-pool-persist ipp.txt ;запоминать в пул ip - адреса push «route 192.168.8.0 255.255.255.0» ;передача клиенту маршрута ;до сети за сервером route-gateway 10.8.0.1 ;шлюз в openvpn сеть client-config-dir ccd ;директория файла с именем клиента, и ;команды для клиента в нём route 192.168.8.0 255.255.255.0 ;маршрут до сети за клиентом persist-key ;не перечитыват ключи после перезапуска OpenVPN persist-tun ;не перезапускать туннель после перезапуска OpenVPN comp-lzo ;включить сжатие keepalive 10 60 ;пинговать каждые 10 сек. и если сервер не отвечает 60 ;сек. считать соединение разорванным, переподключение script-security 2

терминал на сервере выдает sudo openvpn /etc/openvpn/server.conf Fri Feb 16 14:11:09 2018 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 22 2012 Fri Feb 16 14:11:09 2018 NOTE: the current --script-security setting may allow this configurationto call user-defined scripts Fri Feb 16 14:11:09 2018 TUN/TAP device tun0 opened Fri Feb 16 14:11:09 2018 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0 Fri Feb 16 14:11:09 2018 /sbin/ifconfig tun0 10.8.0.1 netmask 255.255.255.0 mtu 1500 broadcast 10.8.0.255 Fri Feb 16 14:11:09 2018 UDPv4 link local (bound): [undef] Fri Feb 16 14:11:09 2018 UDPv4 link remote: [undef] Fri Feb 16 14:11:09 2018 Initialization Sequence Completed

файл client.conf client ;укзываем что это клиент dev tun port 1194 proto udp ca /etc/openvpn/ca.crt ;корневой сертификат cert /etc/openvpn/client1.crt ;сертификат клиента key /etc/openvpn/client1.key ;приватный ключ клиента remote 10.8.0.1 255.255.255.0 ;адрес сервера OpenVPN persist-key persist-tun comp-lzo keepalive 10 60 ;пинговать каждые 10 сек. и если сервер не отвечает 60 ;сек. считать соединение разорванным, переподключение script-security 2

Терминал на клиенте выдает sudo openvpn /etc/openvpn/client.conf Fri Feb 16 15:11:36 2018 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 22 2012 Fri Feb 16 15:11:36 2018 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. Fri Feb 16 15:11:36 2018 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts Fri Feb 16 15:11:36 2018 WARNING: file '/etc/openvpn/client1.key' is group or others accessible Fri Feb 16 15:11:36 2018 LZO compression initialized Fri Feb 16 15:11:36 2018 UDPv4 link local (bound): [undef] Fri Feb 16 15:11:36 2018 UDPv4 link remote: [AF_INET]10.8.0.1:255 Fri Feb 16 15:11:36 2018 write UDPv4 []: Network is unreachable (code=101) Fri Feb 16 15:11:38 2018 write UDPv4 []: Network is unreachable (code=101) Fri Feb 16 15:11:42 2018 write UDPv4 []: Network is unreachable (code=101) Fri Feb 16 15:11:50 2018 write UDPv4 []: Network is unreachable (code=101) Fri Feb 16 15:12:06 2018 write UDPv4 []: Network is unreachable (code=101) Fri Feb 16 15:12:37 2018 [UNDEF] Inactivity timeout (--ping-restart), restarting Fri Feb 16 15:12:37 2018 SIGUSR1[soft,ping-restart] received, process restarting и до бесконечности

все ключи и сертификаты сформированны менее, чем за час до попытки установить соединение

Источник

Смоленск 1.5 network is unreachable Astra Linux SE

Настраиваю сеть на вспомогательном сервере, установил все необходимые пакеты при установки ОС, провёл настройку network согласно инструкции , wicd отключен, ip пересчитал и приписал в interfaces. Настройки сохранил и перезапустил службу (ошибок не было). Настроил bind9 (создал каталоги /var, перенес стоковые настройки из паки /etc/bind, создал ссылку на них в папке /etc, создал спецфайлы блочных устройств /var/named/chroot/dev/null и random, установил права доступа к ним командой chmod 666 - как на картинке, перезапустил bind9) ошибок не обнаружено, сервис стартовал. Далее провёл настройку named.conf, named.conf.options и файлы зон, добавил армы в систему доменных имён) перезапустил службу, служба стартует, но когда проверяешь статус выходит сообщение что служба bind9 не работает . Команда named-checkconf не выдаёт ошибок. Сам себя сервер пингует и по имени и по названию. Настраивал все аналогично работающему основному серверу, который поднимал другой человек. Может нужно что-то отключить ещё или включить ? Почему не работает bind9, какие могут быть проблемы? С астрой познакомился месяц назад.

Rayman

New member

GRamoboi

New member

Настраиваю сеть на вспомогательном сервере, установил все необходимые пакеты при установки ОС, провёл настройку network согласно инструкции (шаблоны прилагаю), wicd отключен, ip пересчитал и приписал в interfaces. Настройки сохранил и перезапустил службу (ошибок не было). Настроил bind9 (создал каталоги /var, перенес стоковые настройки из паки /etc/bind, создал ссылку на них в папке /etc, создал спецфайлы блочных устройств /var/named/chroot/dev/null и random, установил права доступа к ним командой chmod 666 - как на картинке, перезапустил bind9) ошибок не обнаружено, сервис стартовал. Далее провёл настройку named.conf, named.conf.options и файлы зон, добавил армы в систему доменных имён) перезапустил службу, служба стартует, но когда проверяешь статус выходит сообщение что служба bind9 не работает (картинку прилагаю). Команда named-checkconf не выдаёт ошибок. Сам себя сервер пингует и по имени и по названию. Настраивал все аналогично работающему основному серверу, который поднимал другой человек. Может нужно что-то отключить ещё или включить ? Почему не работает bind9, какие могут быть проблемы? С астрой познакомился месяц назад. Посмотреть вложение 398 Посмотреть вложение 399 Посмотреть вложение 400

Lanseer

New member

А что там нужно поправить, завтра вернусь к серверу, посмотрю (как уже сказал, с линуксом почти не занком)

Источник

network: destination host unreachable

enter image description here

I am using Linux oess (CentOS). I am working on a VM: In the terminal, I'm trying to:

ifconfig: inet addr: 192.168.56.101 
sudo /sbin/route add -net 0.0.0.0 gw 192.168.56.101 eth0 
Destination host is unreachable 

enter image description here

for all the sequences. What is the source of the problem? route output:

8 Answers 8

try DHCP for the network interface

sudo /etc/init.d/networking restart && sudo dhclient 

first things first. can you ping 192.168.56.1 ? if so then you have an IP connection to the router, set this as your default route. otherwise try pinging 192.168.56.255 (broadcast) to see on what address you might get replies. see arp -a to check what addresses you can find.

can you ping 8.8.4.4 (google) after changing the default route? if so you have internet access. if not check the router.

can you ping www.google.com? if not you might have a dns problem

do you get results from nslookup www.google.com ?

yes i can ping 192.168.56.101. for 8.8.4.4 i can not reach the destination host. so the problem is internet access. Regarding my router, i still believe it's not a router problems since i usually use diffrent routers. and it did not work in any of them

try #dhclient -r eth0 Or $sudo dhclient -r eth0 This will try to get a automatic ip address from your router.

check the network card of the VM in the virtualization software. is it in "bridged" mode? or in a "NAT" or "host-only" mode?

in the last case change it to bridged and try $sudo dhclient

in the first case, see if the hypervisor itself can ping to its default gw and 8.8.4.4

There are two cases what a computer can do, when it has to forward an IP package:

  • First case: Say the destination IP of the incoming package is 10.20.30.40 and the interface on which the package arrives is configured to be 10.20.30.1 netmask 255.255.255.0 . This is, the packages destination subnet and the interfaces subnet are the same. Then your OS will forward the package to the broadcast 10.20.30.255 (it says "Here is a package that is addressed for someone in my own hood, so please take it!").
  • Second case: Say the destination IP of the incoming package is 10.20.40.40 and the interface on which the package arrives is configured to be 10.20.30.1 netmask 255.255.255.0 . Then the
    destination address lies outside of the interfaces subnet. So it does not know where to send it. So it forwards it to the default gateway
    which in turn tries to find the destination.

In your case the default gateway is exactly the same as your interface IP. That means: When your computer does not know where to send a package it sends it to itself respectively to one of its own interfaces. That sounds strange - and it is. An interface gateway should be in the same subnet as the interface itself, but it should never BE itself. You need another default gateway in the same subnet to be happy.

If you don't know your default gateway for this interface, so try to get a valid default gateway for this interface via DHCP configuration (configure this interface to be a DHCP client).

In the case you are working in a VM (I see it is Virtual Box) try to find out the IP address of the "Virtual Box Host Only Adapter" on your host machine (command: ifconfig or ipconfig). Then configure the IP address of the VM host only adapter to be the default gateway of your VM guest.

On your host machine your should activate ipv4-forwarding and NAT to get internet access:

echo 1 > /proc/sys/net/ipv4/conf/all/forwarding iptables -t nat -A POSTROUTING -o -j MASQUERADE 

If your want to use the "Host Only Adapter" then it may be possible, that you first have to create an "Host Only Network" under File->Preferences choosing the tab "Host Only Networks".

Источник

Читайте также:  Find all files and directories in linux
Оцените статью
Adblock
detector