Community discussions

MUM Europe 2020
 
tyoma53
just joined
Topic Author
Posts: 8
Joined: Fri Mar 21, 2014 9:08 pm

ipv6-to-ipv4 port forwarding

Thu Sep 27, 2018 11:13 pm

Greetings all,

i have an old WD network storage, that i can reach from outside per ftp using dstnat rule.
/ip firewall filter
add action=accept chain=input comment="Accept (established, related)" connection-state=established,related
add action=accept chain=input comment="Accept (FTP)" dst-port=21 in-interface-list=WAN protocol=tcp
add action=drop chain=input comment="Drop external" in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment=NAT out-interface-list=WAN
add action=dst-nat chain=dstnat comment="Forward to FTP" dst-port=21 in-interface-list=WAN protocol=tcp to-addresses=192.168.xxx.xxx to-ports=21
my ISP already has support of ipv6, but unfortunately NAS itself can't ipv6. is this possible to forward request to WAN ipv6 address on 21st port to NAS ipv4, similar like socat can do?

socat TCP6-LISTEN:1234,fork TCP4:1.2.3.4:1234

thanks.
 
Sob
Forum Guru
Forum Guru
Posts: 5171
Joined: Mon Apr 20, 2009 9:11 pm

Re: ipv6-to-ipv4 port forwarding

Fri Sep 28, 2018 1:48 am

Short answer: no

Long answer: Even if RouterOS had something general for tcp connections, it would not help you anyway. You can't pick worse service than ftp for this, because every single transfer (upload, download, even directory listing) means new established connection and info about used addresses and ports is part of protocol, i.e. transferred inside control connection. It could work in some cases, if clients would use only EPSV commands to establish data connections, and if the server supports it. Which it likely doesn't, because it usually goes hand in hand with IPv6 support. You need some specialized ftp proxy for this.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
tyoma53
just joined
Topic Author
Posts: 8
Joined: Fri Mar 21, 2014 9:08 pm

Re: ipv6-to-ipv4 port forwarding

Fri Sep 28, 2018 10:33 am

Short answer: no

Long answer: Even if RouterOS had something general for tcp connections, it would not help you anyway.
thanks.
this was not a question about ftp, but about possibility to forward request from ipv6 WAN to ipv4 LAN. there can be any other protocol/port, e.g. http instead of ftp or 8080 instead of 21.
did i got it right, that routeros can't do ipv6-ipv4 forwarding at the moment?
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1180
Joined: Fri Jul 28, 2017 2:53 pm

Re: ipv6-to-ipv4 port forwarding

Fri Sep 28, 2018 1:00 pm

It's called NAT 64. And ROS can't do it. But why you don't want to use ipv6 unique local unicast routing inside your LAN? It's fc00::/7 and it's not routable in global net.
 
Sob
Forum Guru
Forum Guru
Posts: 5171
Joined: Mon Apr 20, 2009 9:11 pm

Re: ipv6-to-ipv4 port forwarding

Fri Sep 28, 2018 3:06 pm

Because the question was about accessing internal IPv4-only device using IPv6. And no matter what kind of IPv6 addresses you use in LAN, it will still be IPv4-only device unaware of IPv6.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1180
Joined: Fri Jul 28, 2017 2:53 pm

Re: ipv6-to-ipv4 port forwarding

Fri Sep 28, 2018 3:18 pm

Because the question was about accessing internal IPv4-only device using IPv6. And no matter what kind of IPv6 addresses you use in LAN, it will still be IPv4-only device unaware of IPv6.
IPv6 freely supported by all OS. TS can manage it easy.

P.S.: my mistake, cause ULU addresses can't be answered from Internet. So, NAT 64 only.
 
Sob
Forum Guru
Forum Guru
Posts: 5171
Joined: Mon Apr 20, 2009 9:11 pm

Re: ipv6-to-ipv4 port forwarding

Fri Sep 28, 2018 4:57 pm

Maybe standard OSes, they do have IPv6 support available since many years back. But there are various kinds of NAS devices, IP cameras, etc. A lot of them don't need to be older than few years to not have any idea about IPv6. Even some currently sold new ones still don't have it.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
tyoma53
just joined
Topic Author
Posts: 8
Joined: Fri Mar 21, 2014 9:08 pm

Re: ipv6-to-ipv4 port forwarding

Sat Sep 29, 2018 4:40 pm

thank you all.
i have known about unsupported by routeros NAT64, but hoped there is still something to forward request.

theme can be closed.
 
ThomasLevering
just joined
Posts: 8
Joined: Mon Nov 14, 2016 8:38 am
Location: Germany

Re: ipv6-to-ipv4 port forwarding  [SOLVED]

Mon Oct 01, 2018 5:50 pm

+ for IPv6 NAT64
and NAT IPv4 to IPv6 (I have a small Programm, that can do this, incl. add/remove SSL)

IP-Cloud Adress is now IPv4 and IPv6
Forwarding Port 80 to Server works for IPv4
IP-Cloud IPv6 Adress is to Router not Server

Dyndns IPv4 and IPv6 -> IPv6 Firewall must be changed every IPv6 Subnet change,
(or IPv6 Dyndns in AdressList in IPv6 Firewall)
I need a Firewall Rule for IPv6 match only the last ::/64
aaaa:aaaa:aaaa:aaaa:bbbb:bbbb:bbb:bbbb Part "aaaa" is Dynamic and "bbbb" fixed/Internal part from IP

Who is online

Users browsing this forum: joserudi, microcat and 45 guests