A
A
Alexander2017-08-29 10:48:28
Debian
Alexander, 2017-08-29 10:48:28

How to fix internet connection error in Debian 8 guest?

Greetings.
I'm running Windows 10 x64 with VirtualBox installed. Network adapter interface for guest OS: NAT. On a simple install, Debian chose only system utilities (ie not installed: SSH, web server, print server, GUI).

  1. Once installed, the following command runs successfully:
    telnet ya.ru 80
  2. Next, I configure netfilter:
    iptables -F
    iptables -t nat -F
    iptables -X
    iptables -P FORWARD DROP
    iptables -P INPUT   DROP
    iptables -P OUTPUT  ACCEPT
    iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    iptables -A INPUT -p tcp --dport 443 -j ACCEPT
    iptables -A INPUT -i lo -p all -j ACCEPT
    sh -c "iptables-save > /etc/iptables.rules"

  3. I prescribe automatic application of settings in /etc/network/interfaces:
    auto eth0
    iface eth0 inet dhcp
        pre-up iptables-restore < /etc/iptables.rules

  4. I reboot the virtual machine. netfilter settings applied.
  5. The following command fails with a message that data could not be retrieved:
    telnet ya.ru 80
    Error: Telnet : Temporary failure in name resolution : Host name lookup failure

What is the problem? Obviously netfilter is not configured correctly. Could this be a feature of using Debian as a guest virtual OS?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2017-08-29
@codemafia

Allow to receive answers to DNS requests. UDP 53 port. In OUTPUT it is allowed, but in INPUT DROP, of course, DNS will not work and will not work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question