REDIRECT
This target is only valid in the nat table, in the PREROUTING and OUTPUT chains, and user-defined chains which are only called from those chains. It redirects the packet to the machine itself by changing the destination IP to the primary address of the incoming interface (locally-generated packets are mapped to the 127.0.0.1 address). It takes one option:
--to-ports port[-port]
This specifies a destination port or range of ports to use: without this, the destination port is never altered. This is only valid if the rule also specifies -p tcp or -p udp.
what is that?
It's been suggested that the lack of a NAT capability for IPv6 is a roadblock for IPv6 Hotspot. Here is an implementation of NAT allowing IPv6 Redirect.what is that?
ip6nat
======
Requires libnefnetlink (libnfnetlink-0.0.39 tested) and
libnetfilter_queue (libnetfilter_queue-0.0.16 tested), both
available on http://netfilter.org.
Should also be available on most dists via libnfnetlink,
libnfnetlink-devel, libnetfilter_queue and libnetfilter_queue-devel
RPMs.
I know, I know! IPv6 was designed for end-to-end use-case and there
is no need for NAT etc. Thats exactly why theres no ip6nat
inside netfitler. However, in some cases, especially transparent
proxying for example to setup on-the-fly virus scanning, SPAM traps
or pentesting SSL applications, it is very useful.
Even though ip6nat could NAT whole network ranges from private address
ranges (link local) to public ones, the intended use is as
described above.
There is a sample.conf file describing how to use the rules, then
basically just start ip6nat as root with your conf-file,
redirect the traffic you need to translate via ip6table QUEUE target
into ip6nat, and you are done.
tp-test shows how you can use ip6nat API to find out where
original connections should go if you write a transparent
proxy.
If using -R, make sure you have a /dev/log device inside.
#
# ip6nat config file
#
# generic template:
# <proto> <table> <addr1> <port1>-><addr2> <port2>
#
# where: proto is one of {icmp, udp, tcp}
# table is one of {dnat, snat} for destinantion NAT or source NAT
# addr1 the address or address-range that the packet must match
# if table is dnat, the destination of packet must match
# and respectively for snat the source must match
# port1 if proto is udp or tcp, this port must match too;
# source-port if snat is used, destination port if dnat is used
# a port of 0 matches any port
# addr2 this is the address to which the packet is translated if addr1/port1
# rule matches
# port2 ditto. if port2 is 0, then the port is not translated
# Please also see setup.sh. 2001::1 was a local address, 2002, 3001 and 4000
# were remote machines with apropriate routing entries set.
#
# For every proto and table, only the first matching rule is taken,
# so write the more specific rules first (e.g. single address before network
# address). As a general rule, do not try to be too clever with the rules,
# like SNATing and DNATing packets so that they all equal or alike,
# this will confuse the translator.
# Also, use carefull chosen ip6table rules to only QUEUE the packets
# you want to translate. This speeds up NAT and helps to avoid
# misconfigs. See setup.sh how to QUEUE packets.
# all tcp to 3001::1.22 is translated to 2001::1.22
tcp dnat 3001::1 22->2001::1 0
tcp dnat 3001::1 1234->2001::1 8080
# all tcp from 2001::1.x is translated to src port 7890 (singleton connection)
#tcp snat 2001::1 0->2001::1 7890
# all tcp to 2002::1.22 is translated to 2001::1.1234
tcp dnat 2002::1 22->2001::1 1234
# icmp has no ports, set it to 0
icmp dnat 3001::1 0->2001::1 0
# all tcp to network 4000::/16 port 22 is translated to 2002::1.22
tcp dnat 4000::1/16 22->2002::1 0
So it's official then, Mikrotik is getting out of the hotspot with captive portal business?Those are non standard hacks. We will only use approved standards in our ipv6 implementation
what do you mean, of course there is. NAT is a documented technology standard. All the mechanism that make hotspot work are.There isn't an RFC for an IPv4 captive portal implementation let alone IPv6
Actually it only captures IPv6 traffic that is directed to the QUEUE target in iptables, so it's not all traffic.To bevhost: Code you provided link to captures all IPv6 traffic to user space for processing and that will mean massive performance penalty.
If it is possible to add the IPv4 data and the IPv6 data in the same radius session, I would like my own extra piece of functionality and that is to have traffic to the walled garden not count towards the radius totals. (Since that is free traffic that they can use without logging in)For 3a) currently (on our system anyway) client initally hits the mikrotik login.html which redirects to our hotspot website where the client must purchase time&data the when they click the connect button to continue we redirect them back to the mikrotik alogin.html with radius credentials so that the client can be logged in via radius. At this point the status.html pops up in a new window and the main window redirects to the initial page the client requested. I invisige that another redirect happen here that also make a call to a mikrotik blogin.html to do an IPv6 radius or whatever login. This second redirect would be to an IPv6 Address so that the mikrotik could discover the IPv6 Address Associated with the client in addition to the IPv4 Address. A session token could be passed to both the IPv4 alogin.htm and the IPv6 blogin.html, so the router can know which IPv4 belongs with which IPv6.
For 3b) To have combined sessions the IPv4 counters would have to be combined with the IPv6 counters to create a single radius session. ie instead of IPv6 creating it's own radius session, it would simply add itself to the existing IPv4 session. I have a feeling that this might be tricky to achieve without some effort.
I am well aware of that, but it's still better than no solution at all.What you're suggesting might help in the interim (and I'm not at all saying Mikrotik shouldn't consider it) but as IPv6 usage increases it becomes less valuable as a solution.
did you read the discussion at all?Yes
Bring on v6 support for hotspot and PPPoE server.
From reading the discussion I deduced that there is not currently IPv6 support for the hotspot. I then decided that adding IPv6 support for the hotspot would be a good thing and posted my support for the proposal in addition to IPv6 support for PPPoE server.did you read the discussion at all?Yes
Bring on v6 support for hotspot and PPPoE server.
There's a few things that need to be v6'ed before hotspot can run , Simple queues off the top of my headSo if it was unclear by my previous post: I hereby voice my support of this thread and the request to add IPv6 support to the hotspot.
I never said I was opposed to this...There's a few things that need to be v6'ed before hotspot can run , Simple queues off the top of my headSo if it was unclear by my previous post: I hereby voice my support of this thread and the request to add IPv6 support to the hotspot.
I have heard this kind of prediction every year for the last 5 years already
14 /8's remain, Current consumption rate puts that at May 2011 followed by 6 months for the RIR's to hand it out. Then its off to the v4 market place or reclaim some of that multicast space which will be horrible
so, you didn't understand the main point of this discussion. it's not possible to make ipv6 hotspot because there is no NAT.From reading the discussion I deduced that there is not currently IPv6 support for the hotspot. I then decided that adding IPv6 support for the hotspot would be a good thing and posted my support for the proposal in addition to IPv6 support for PPPoE server.
You've heard alarmist reports based on shaky data, Look at the numbers, look at consumption, Look at how many /8's are handed out each year and to what RIR'sI have heard this kind of prediction every year for the last 5 years already
14 /8's remain, Current consumption rate puts that at May 2011 followed by 6 months for the RIR's to hand it out. Then its off to the v4 market place or reclaim some of that multicast space which will be horrible
IANA has given RIRs 12 /8 so far this year, 6 of which went to APNIC who has China and India in their area of responsibility. How much more time do you think 14 /8 is going to last when two of the most populous nations on Earth are experiencing an explosion of uptake in Internet use?I have heard this kind of prediction every year for the last 5 years already
14 /8's remain, Current consumption rate puts that at May 2011 followed by 6 months for the RIR's to hand it out. Then its off to the v4 market place or reclaim some of that multicast space which will be horrible
Well just as long as the matter is being taken seriously...we are currently thinking of other options, but they all will impact performance in a very big way
so, you didn't understand the main point of this discussion. it's not possible to make ipv6 hotspot because there is no NAT.From reading the discussion I deduced that there is not currently IPv6 support for the hotspot. I then decided that adding IPv6 support for the hotspot would be a good thing and posted my support for the proposal in addition to IPv6 support for PPPoE server.
we are currently thinking of other options, but they all will impact performance in a very big way
Can you point to a working method of doing Ipv4->Ipv6 Translation that works both ways? Clients want IP addresses that are reachable from he Internet, I don't see how NAT can solve this problem.Not to ask a blatently stupid question, but given that the current HotSpot code runs IPv4, why would you *need* it to support IPv6 (on the client-facing side) in your own lifetime ?
IPv4 NATing, IPv4->IPv6 translation on the HotSpot router sorts it doesn't it ?
'Legacy' IPv4 support will be around for quite a few years, and as the code is free and stable, and Flash memory gets cheaper and bigger, it's not likely to disappear in a *poof* of smoke.
Right now we already have to use PPPoE client instead of Hotspot login for clients that want a public IP address. It requires a lot more helpdesk time to get it setup.Clients want IP addresses that are reachable from he Internet
And some sites have downstream routers with more clients behind them. These require L2TP tunnels. Even more hassles.Right now we already have to use PPPoE client instead of Hotspot login for clients that want a public IP address. It requires a lot more helpdesk time to get it setup.Clients want IP addresses that are reachable from he Internet
Can you point to a working method of doing Ipv4->Ipv6 Translation that works both ways? Clients want IP addresses that are reachable from he Internet, I don't see how NAT can solve this problem.Not to ask a blatently stupid question, but given that the current HotSpot code runs IPv4, why would you *need* it to support IPv6 (on the client-facing side) in your own lifetime ?
IPv4 NATing, IPv4->IPv6 translation on the HotSpot router sorts it doesn't it ?
'Legacy' IPv4 support will be around for quite a few years, and as the code is free and stable, and Flash memory gets cheaper and bigger, it's not likely to disappear in a *poof* of smoke.
The closest thing I've seen is described here http://en.wikipedia.org/wiki/6rd
If you have just 1 public v4 (with enough speed attached), you can have plenty of IPv4 private space to make a Mint.not being able to give 1 v4 IP to a user anymore
The norm is to hand a /64 to a client, a /96 has the same number of IP's as the entire v4 space including RFC etcIPv6 (i forget where i read this) has enough to give 1500 addresses to each square foot of the surface of the earth.
You mean like what most users have already ?get used to the idea that their Internet connection isnt going to have a static v4 globally routed address to use
Would hate to have a net connection like that, double nat is yuck. Over in my section of the world users get very annoyed when they dont have STATIC v4 public, Same for the AU and alot of Asia aswellYou mean like what most users have already ?get used to the idea that their Internet connection isnt going to have a static v4 globally routed address to use
I have never sold a public IPv4. Never will.
We're doing this now, but clients want a public Internet reachable address. Stateful NAT doesn't do this. Perhaps we should implement Stateless IVI on the MT instead.If you have just 1 public v4 (with enough speed attached), you can have plenty of IPv4 private space to make a Mint.
So you're not an Internet Service Provider then.I have never sold a public IPv4. Never will.
What about those of us using the hotspot as an Ethernet authentication method. Adding PPPoE provides a public address for the user (so no double nat) while Hotspot provides private addresses NAT'd behind publics.Downstreaming from a Client-facing hotspot isn't a brilliant idea.
I have did that a few times because it is cheaper/easier than putting up another antenna.
To save cost/hassle/security error why not just make a VAP on the same interface ?
I believe the norm is actually now to hand a /48 (or a /56 if you're stingy) to the client so they can break it up, given that people can have separate router / wireless AP.The norm is to hand a /64 to a client, a /96 has the same number of IP's as the entire v4 space including RFC etcIPv6 (i forget where i read this) has enough to give 1500 addresses to each square foot of the surface of the earth.
I see a lot of "how to setup hotspot" guides that include forwarding a single Port per private IP so the users get at least one service, however IPv6 has no need for this sort of address hoarding.I've heard the whole double-nat thing is popular in LANIC area due to the fees
True, No need to be wastful from the start tho, Residential's have no need for multiple subnets yet so handing out /64's is fine, /48's for Business clientsI believe the norm is actually now to hand a /48 (or a /56 if you're stingy) to the client so they can break it up, given that people can have separate router / wireless AP.The norm is to hand a /64 to a client, a /96 has the same number of IP's as the entire v4 space including RFC etc
If you want to be really stingy just allocate a /60, I have a residential internet service and I use more than one LAN.True, No need to be wastful from the start tho, Residential's have no need for multiple subnets yet so handing out /64's is fine, /48's for Business clients
of course, how silly do you think I am?Do you separated layer 2 between your "Hotspot" and Normal lan? If not having 2 subnets is a complete waste of time since v6 local link address would be able to be used between then
Please forgive my presumptiousness.So you're not an Internet Service Provider then.
So do I in most cases on the WLAN side, but the temptation to just stick a Downstream HotSpot on it and add a binding on the Upstream HotSpot is tooo easy to *not* do.What about those of us using the hotspot as an Ethernet authentication method
I find it slightly ironic that you've posted this when MT has said v6 isnt being really worked on due to demand and the article states that 1/2 the reason why the transition will be painful if because IT services and manufactures are ignoring it or not putting the resources needed on it. MT's v6 features need work, There are large holes in whats there that is needed for transition and getting traction is slow, The article you point to states v4 will run out in 2-3 years, It's looking like its closer to 2 and thats inline with what the numbers point to, 9 months till IANA runs out and 6-12 months till RIR's run out.an interesting article today: http://arstechnica.com/business/news/20 ... e-ugly.ars
Small ISP's have gotten away with this in the past but with where tech is heading they wont be able to much longer, I have no doubt that you know what your doing but the standard is most parts of the real world hand out public v4 to their clientsPlease forgive my presumptiousness.So you're not an Internet Service Provider then.
I've only been in internet since about 1990, so i still have a lot to learn.
It's was a real help to have gotten into electronics 11 years earlier, and programming a year after that, but i only started business on my own 17 years ago, so how could i possibly know anything ?
what? where did I say that?MT has said v6 isnt being really worked on due to demand
Maybe i have always inhabited parts of the Unreal world. Maybe a Virtual world.most parts of the real world hand out public v4
This is not a debate about the need or lack thereof for IPv6.There is no *need* for IPv6. It is simply a logical Upgrade to IPv4.
However, it is now Urgent for what reason ?
Sigh.IPv6 quadruples the number of network address bits from 32 bits in IPv4 to 128 bits, which provides more than enough globally unique IP addresses for every networked device on the planet.
_______________________________________________________________________
Remaining IPv4 Address Space Drops Below 5%
_______________________________________________________________________
IPv6 adoption at critical phase
Record number of IPv6 addresses distributed
Amsterdam, 18 October 2010 – The Number Resource Organization (NRO)
announced today that less than five percent of the world’s IPv4
addresses remain unallocated. APNIC, the Regional Internet Registry for
the Asia Pacific region, has been assigned two blocks of IPv4 addresses
by the Internet Assigned Numbers Authority (IANA). This latest
allocation means that the IPv4 free pool dipped below 10% in January,
just nine months ago. Since then, over 200 million IPv4 addresses have
been allocated from IANA to the Regional Internet Registries (RIRs).
"This is a major milestone in the life of the Internet, and means that
allocation of the last blocks of IPv4 to the RIRs is imminent," states
Axel Pawlik, Chairman of the Number Resource Organization (NRO), the
official representative of the five RIRs. "It is critical that all
Internet stakeholders take definitive action now to ensure the timely
adoption of IPv6."
...
According to current depletion rates, the last five IPv4 address blocks will be allocated to the RIRs in early 2011. The pressure to adopt IPv6 is mounting. Many worry that without adequate preparation and action, there will be a chaotic scramble for IPv6, which could increase Internet costs and threaten the stability and security of the global network.
Good point.why do you feel this discussion is even relevant to you?
Correct:pepperspot.sourceforge.net seems to support IPv6
Pepperspot (the IPv6 version of chillispot) also has a hotspot implementation running now.
...
the whole source code is available http://pepperspot.sourceforge.net/
Its every 2-3 months for APNIC who have China and India churning through them. APNIC will run out well before end of 2011.E-mail support, Keep asking. Make sure they know that you want v6 worked on. RIPE (Europe RIR) chews through a /8 every 3-5 months so it looks like RIPE is out sometime between June 2011 and Jan 2012