How to set up a network in OpenWRT?

Good evening, everyone. Can't solve a problem, I hope you can help me. There is a virtual machine(VirtualBox), has its own compiled OpenWrt firmware x86 with almost all packages I need, also iptables-mod-extra, its in the Assembly to enable it did not work, since it just isn't there. Accordingly, the only way to download on the running machine. Installation is made on such instructions. Put network bridge(if that). Fulfill all the requirements, and connect to it from the LAN. It seems like everything is configured, but there is one thing. The command opkg works is not entirely correct. For example write opkg install iptables-mod-extra, and he says
Collected errors:
 *opkg_intall_cmd: Cannot install package iptables-mod-extra.
More interesting, the command opkg install for any package that writes what I wrote above, only instead of iptables-mod-extra is the name of another package. Then it turns out that the command opkg list-installed and opkg list which should show the list of all installed packages and generally non-responsive, i.e. nothing happens. And one more thing. The command ping is working as it is inadequate. Team
writes ping: bad address '' and or react normally flashes them, receives answers. On another forum I was told that the network is configured incorrectly. But how to set silent. So I came to you.
P. s: iptables-mod-extra is needed for redsocks, so without it in any way.
1 answer
July 2nd 19 at 17:55
1. First configure access to Internet if the domain name is not pinged, it is not correctly configured DNS servers.
2. Must have a source of third-party packages for your platform.
3. When two initial points are fulfilled, do opkg update to refresh the list of available packages.
4. Put your desired package opkg install ....

There is also a second option, downloading ready you need iptables-mod-extra, and install it from the folder where you downloaded, for example, opkg install /tmp/iptables-mod-extra.the ipk but if there are dependencies, they also need to download.
From what I managed to Google, as I understand it you need to install bind9 and configure it? - Demario.Wel commented on July 2nd 19 at 17:58
: for DNS you just need to register the correct DNS servers in /etc/init.d/dnsmasq - arianna.Lark commented on July 2nd 19 at 18:01
DNS_SERVERS="here" - arianna.Lark commented on July 2nd 19 at 18:04
: Thank you very much) Ping earned, and downloading is almost too. Only leads to the following problem. From what had gone and to come. Initially, I wrote to the toaster, with the problem download the OpenWRT image VDI, as it was not loaded and went to the grub recovery and the root was not in /boot, and boot I couldn't. With iso, the system is loaded without problems, my question no one answered, so I left to another forum. And here again now, twenty-five. When writing the command "opkg install iptables-mod-extra" goes as follows "Installing iptables-mod-extra (1.4.21-1) to root...
Collected errors:
* verify_pkg_installable: Only have 0kb available on filesystem /overlay, pkg iptables-mod-extra needs 9
* opkg_install_cmd: Cannot install package iptables-mod-extra." He does not have enough space, and it is correct, the system then with the image loaded, not hard. What would you recommend in this situation? As I do not know... - Demario.Wel commented on July 2nd 19 at 18:07
: I can only recommend to first create a partition on any available media and mount it as /overlay , only do not forget before mounting to transfer the contents of an old section with all the references and access rights for a new category, for example tar-C /overlay-cf . | tar -C /mnt/sda1 -xf - ( the example assumes that you are using a partition /mnt/sda1) - arianna.Lark commented on July 2nd 19 at 18:10
by the way, I don't understand why you can't konvertnut working image for iso to vdi - arianna.Lark commented on July 2nd 19 at 18:13
: Okay, thank you, I don't promise I have time today to try, but try to be sure to accomplish your goal. Convert can't, because were not converted at all, i.e. nothing happened( but tried on Windows and some other instructions). I'll try both of your method, assuming that all this is done as the test Assembly, and for educational purposes only, it is really an external USB flash drive can save the situation, I just need to understand that all on x86 is working fine, because the router will be more difficult to do, especially if there is somewhere some kind of a joint) - Demario.Wel commented on July 2nd 19 at 18:16
: So I'll start in order. My build in the VDI format and wouldn't open. Downloaded from OpenWrt, set up VitrualBox on Ubuntu, I converted the img to VDI. All start the grub menu, choose the axis and loaded with no problems. I'll try to compare the packages installed on the build with OpenWrt and my build method of an experiment will establish what is missing (although it sounds like nonsense, IMHO))). Downloaded the packages to build from OpenWrt, everything downloaded without any problems. And iptables-mod-extra and redsocks, but again nothing happened with tincture iptables. Wrote about it at the toaster, I was told that the command "iptables-t nat -A OUTPUT-p tcp -m owner --uid-owner username-j REDSOCKS" requires , but the error "iptables v1.4.21: owner: Bad value for "--uid-owner" option: "OpenWrt" as a way out, and leaves. It is not like it, but what I can not understand. Did this instructions: - Demario.Wel commented on July 2nd 19 at 18:19
: I will answer briefly - in the instructions for --uid-owner need to register the user in openwrt's root - arianna.Lark commented on July 2nd 19 at 18:22
: I'm sorry that my response dragged on for so long. I hope you will not forget and will respond to my post. About root I knew the problem was the drains(I think) "-j REDSOCKS" without the bottom rule "iptables-t nat -A OUTPUT-p tcp -m owner --uid-owner username" is without error. Second, even after that there is the RUB, how to make it work what I wrote to him in tinctures? On the website(which I gave in another post) says to run the command "/path/tothe/bin/redsocks -c redsocks.conf
/path/tothe/bin/" but he swears on such teams, so again a dead end. I went further, searched Google with Yandex napara, found mentions of Redsocks settings on the router, only for Thor here: did everything according to instructions, but the ip has not changed. Wrote them on the forum, still silent. It may be advisable to create a new topic, with all the problems at the moment? - Demario.Wel commented on July 2nd 19 at 18:25
: "/path/tothe/bin/redsocks is the path to the executable file, you need to specify your correct, I do not know exactly where he is, but I suspect that it will be somewhere in /sbin/redsocks and the config is in /etc/redsocks.conf or adjusting the config to run as in example - /etc/init.d/redsocks start
after running you should see the process running redsocks in the process. - arianna.Lark commented on July 2nd 19 at 18:28
You have to understand what every command does, and not just copy chunks of code into the console, then everything will work. - arianna.Lark commented on July 2nd 19 at 18:31
In the last link is all written correctly, you only need to tweak the configs for their addresses - arianna.Lark commented on July 2nd 19 at 18:34
: Certainly agree with you that we need to understand and understand what and where you copy, working on it, if I don't understand the situation I'm writing here. About address, of course I was figuring it out on their own, a router address and subnet address of the router. But still not working, then something is wrong with me. Not all clear to me, so I'm asking you. For example, on the first website it says that the chain needs to do via iptables, but in the second statement, just add a set of commands in firewall, why is that? Throughout the directory found 2 file redsocks "/usr/sbin/redsocks" and "/etc/init.d/redsocks". Redsocks.conf file lies in "/etc/redsocks.conf". First c iptables finally succeeded. All rules added with no problems. Then I configured redsocks.conf, having dealt with him and wrote this command "/usr/sbin/redsocks -c /etc/redsocks.conf. No error was, that is all right. But I have a problem here. In the instructions there is a command "/path/tothe/bin/". The iptables file is the file too, but United together no. Just found 2 file "/usr/lib/iptables" and"/usr/sbin/iptables". On command "/usr/sbin/" it says the file not found is. And "/usr/sbin/" says view Help, they say the wrong team. In help-e of course found nothing. This is the situation. As I understand it, this command tells what rules should apply when running Redsocks. - Demario.Wel commented on July 2nd 19 at 18:37
Let's first define redsox is a proxy, you where and what to proxy going? The first statement describes the setup on Linux, and for different systems. The second statement describes proxying for TOR. - arianna.Lark commented on July 2nd 19 at 18:40
If you're talking about the ultimate goal, I need to get filtered traffic through the external socks server spoofing dns addresses. That is, using redsocks to send a request to a socks server and to get answers through him only spoofing dns and ip, respectively. I decided that if I can't configure it, then try to set up on Thor(because there were given prepared instruction, I think) , and when the mood for Thor, a method scientific'll catch on before setting on socks. It's very confusing happened. - Demario.Wel commented on July 2nd 19 at 18:43
well then do it strictly by the second user, including the installation and configuration TOP - arianna.Lark commented on July 2nd 19 at 18:46
: You understand the Iptables rules? - Demario.Wel commented on July 2nd 19 at 18:49

Find more questions by tags LinuxSystem administrationDomain name system* nix-like systems