NICMx / Jool

SIIT and NAT64 for Linux
GNU General Public License v2.0
326 stars 66 forks source link

[Documentation] Update OpenWrt installation/configuration #360

Closed treysis closed 2 years ago

treysis commented 3 years ago

The current stable version of OpenWrt (19.07.7) still uses the old Jool-3.x, which still uses insmod jool pool6=64:ff9b::/96. The upcoming branch of OpenWrt (21.02) will use Jool-4.x, which uses the new configuration method employing jool-tools.

I think the documentation page should mention that the current syntax is used only for Jool-3.x and how to use the new syntax. This also applies to people that manually build/update Jool on current or older OpenWrt branches.

ydahhrk commented 3 years ago

The upcoming branch of OpenWrt (21.02) will use Jool-4.x, which uses the new configuration method employing jool-tools.

Really? How do you know this? And which 4.x will it be?

I think the documentation page should mention that the current syntax is used only for Jool-3.x

Ok, your grammar seems a bit off, so let me see if I understand you correctly:

You're asking me to mention that the current OpenWRT Jool uses the old 3.5 syntax in the giant warning message at the top of this page. Is that correct?

and how to use the new syntax

I definitely do not understand this part of the sentence.

treysis commented 3 years ago

The upcoming branch of OpenWrt (21.02) will use Jool-4.x, which uses the new configuration method employing jool-tools.

Really? How do you know this? And which 4.x will it be?

It's written in the Makefile: https://github.com/openwrt/packages/blob/openwrt-21.02/net/jool/Makefile Thus, it will be 4.1.4 probably. Maybe it will get updated at some point.

I think the documentation page should mention that the current syntax is used only for Jool-3.x

Ok, your grammar seems a bit off, so let me see if I understand you correctly:

You're asking me to mention that the current OpenWRT Jool uses the old 3.5 syntax in the giant warning message at the top of this page. Is that correct?

Yes.

and how to use the new syntax

I definitely do not understand this part of the sentence.

In the 3.x-version you would use insmod jool pool6=64:ff9b::/96, but for the new version (i.e. new syntax) you just load the module and then set the NAT64 prefix with jool-tools, e.g. (if you're using iptables):

modprobe jool
jool instance add potato --iptables --pool6 64:ff9b::/96
iptables -t mangle -A PREROUTING --destination 192.0.2.0/24 -j JOOL --instance potato

Because currently, everyone visiting your page for OpenWrt instructions will try the old method and wonder why translation isn't working.

augustineas commented 3 years ago

Well, this is exciting: "jool: Update to 4.1.5 #15340" - https://github.com/openwrt/packages/pull/15340

Edit: It is in the "master" branch at least

ydahhrk commented 3 years ago

@treysis: I gave the whole OpenWRT page a fat review today: https://nicmx.github.io/Jool/en/openwrt.html

Is this good enough?

Well, this is exciting: "jool: Update to 4.1.5 #15340" - openwrt/packages#15340

Edit: It is in the "master" branch at least

@augustineas: Are you acquainted with the packages feed? Is this the right way to install it?

It works for me, but it seems like overkill just to install one package.

augustineas commented 3 years ago

Sorry, I am not familiar with the packages feed. I agree that it seems overkill, but I am very new to OpenWRT development so I don't really know what is required. I haven't found a "Getting started with package development for OpenWRT" type of document yet, so I am going through the whole firmware development process.

I did ask that they put 4.1.5 into 21.02 and they did, so that was very nice of them.

treysis commented 3 years ago

It works for me, but it seems like overkill just to install one package.

It's a bit complicated. The OpenWRT build system can be customized, but by default it will build all modules so that they can later be installed using opkg. Usually, building OpenWRT is nothing that you do yourself. Additional kernel modules are even more complicated as they will change the version magic of the kernel.

That means, once 21.02 will be released they will build all modules and packages by default, so Jool can then be installed just with opkg by the user.

ydahhrk commented 3 years ago

I understand, but as far as I know, there is no release date for OpenWRT 21.02 yet. And Jool 3.5 is years old.

That's why I'm giving two options: Either install the easy one and deal with the obsoleteness, or go the extra mile and enjoy the extra features.

Once 21.02 comes out I will remove method 2, but it might take a long time.

treysis commented 3 years ago

21.02 should be released in the coming weeks.

Your instructions will build the most current version of OpenWrt, even newer than the 21.02 branch. It's also possible to build this for 19.07 (what I did), but that is a bit more complicated because you need to manually adjust the Makefile to point to the current version of Jool.

I think your instructions are ok the way they are. It would be nice if the official OpenWrt would backport Jool 4.x to 19.07, but I don't think that's gonna happen.

ydahhrk commented 2 years ago

Ok; it seems they released 21.02 in September. Guess the documentation can finally be simplified.

ydahhrk commented 2 years ago

https://nicmx.github.io/Jool/en/openwrt.html

Feedback welcome. It'll be mirrored in jool.mx in a few days.