Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: DebWRT cannot setup BASIC nat please help
alucinor
Newbie
Posts: 3
Permalink
Post DebWRT cannot setup BASIC nat please help
on: February 27, 2016, 03:51
Quote

So I have an edgerouter lite, got webwrt installed onto the router, updated the system with apt-get.

Now I was attempting to turn it into a basic router, which I thought would be trivial, but I guess not...

root@debwrt:~# iptables -t nat -F
iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do y
ou need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
root@debwrt:~# lsmod
Module Size Used by
iptable_filter 1136 0
nf_nat 12396 0
nf_conntrack 90556 1 nf_nat
ip_tables 16957 1 iptable_filter
x_tables 17490 2 ip_tables,iptable_filter
ipv6 329301 24
autofs4 25123 0
root@debwrt:~#

help???

alucinor
Newbie
Posts: 3
Permalink
Post Re: DebWRT cannot setup BASIC nat please help
on: February 27, 2016, 04:08
Quote

after some more troubleshooting I ran into this;

root@debwrt:/etc# modprobe iptable_nat
modprobe: ERROR: could not insert 'iptable_nat': Protocol wrong type for socket
root@debwrt:/etc#

amain
Administrator
Posts: 222
Permalink
Post Re: DebWRT cannot setup BASIC nat please help
on: February 27, 2016, 09:12
Quote

Hi,

I'm aware of this issue. I haven't had time to investigate, also because there is a workaround. Somehow automatic loading of dependent iptables kernel modules does not work. I assume OpenWrt made some kernel (config) changes in that area. So modules have to be loaded manually. I wrote some script somewhere to do this, but can't find this. If I locate it, I'll post it. What I recall is that it was not easy to figure out which ones needed to be loaded and in what order. But modules are there and NAT does work.

Regards,

Johan

alucinor
Newbie
Posts: 3
Permalink
Post Re: DebWRT cannot setup BASIC nat please help
on: February 27, 2016, 19:14
Quote

Thanx for the info! I will be able to manually do it by hand using /sbin/modinfo and then write a script. I've never messed with a *nix system that requires you to manually load each individual module before 🙂

amain
Administrator
Posts: 222
Permalink
Post Re: DebWRT cannot setup BASIC nat please help
on: February 28, 2016, 13:27
Quote

Welcome. Yeah, it feels a bit like going back in time. 🙂

Can you share this script if you have it?

EHeM
Advanced
Posts: 56
Permalink
Post Re: DebWRT cannot setup BASIC nat please help
on: February 29, 2016, 07:57
Quote

I suspect this is either due to the transition between kernel filter module flavors and/or `iptables` module flavor. First there was "iptables", then "xtables", and now "netfilter" (note this order may not be correct and I'm unsure of the proper names).

On observation I wonder if I'm probing the right modules, but adding "nf_conntrack_ipv4" and "nf_conntrack_ipv6" to /etc/modules should fix the difficulty.

amain
Administrator
Posts: 222
Permalink
Post Re: DebWRT cannot setup BASIC nat please help
on: February 29, 2016, 20:00
Quote

That actual works EHeM, thanks! Do you haven an idea why nf_conntrack_ipv* modules are not automatically loaded? It sounds like that somewhere deeper in Debian/Kernel something is not taken care of.

Side note: Actually since kernel 2.4, netfilter (or also called iptables), is the packet filter implementation used. ipfwadm for kernel 2.0 and ipchains for kernel 2.2. Actually, and probably a less interesting note: I used to work for the company that originally developed ipfwadm.

EHeM
Advanced
Posts: 56
Permalink
Post Re: DebWRT cannot setup BASIC nat please help
on: March 2, 2016, 02:34
Quote

Yup, got to play with the earlier ones too. I was limiting it to the variants of the current shtick. Beyond guessing it is due to some portion of it being in a temporary transition, I've got no idea why this is currently partially broken. While having more frequent releases has its advantages, it also has disadvantages.

amain
Administrator
Posts: 222
Permalink
Post Re: DebWRT cannot setup BASIC nat please help
on: January 1, 2017, 18:06
Quote

Solved actual issue here. OpenWrt applies a patch to the Linux kernel to optimize kernel modules for size. However, during this optimization important information needed by depmod / modprobe to allow automatic loading of many modules, is lost. Problem has been solved in: http://dev.debwrt.net/changeset/900

More information: https://lists.openwrt.org/pipermail/openwrt-devel/2014-January/023307.html

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.04 seconds.