★ wanayoo — archive 1999 https://github.com/hardware/mailserver/pull/232Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IPv6 NAT support. #232

Merged
merged 1 commit into from May 3, 2018
Merged

Add IPv6 NAT support. #232

merged 1 commit into from May 3, 2018

Conversation

@navossoc
Copy link
Contributor

@navossoc navossoc commented Apr 8, 2018

Description

Add IPv6 NAT support.
Helps to solve IPv6 network problems like identifying the real ip address of connections through IPv6.

Fixes # (issue)
#221

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Status

  • Ready

Todo List

  • Documentation

How has this been tested ?

I'm currently running this for 20 days, no issues so far.

  • IPv4 connection:

Example
telnet your_server_ipv4 587
telnet 104.131.xxx.xxx 25

Expected

mailserver      | 2018-04-08T02:50:12.073149+00:00 mail postfix/submission/smtpd[625]: connect from unknown[186.214.xxx.xxx]
mailserver      | 2018-04-08T02:50:12.357745+00:00 mail postfix/submission/smtpd[625]: lost connection after CONNECT from unknown[186.214.xxx.xxx]
mailserver      | 2018-04-08T02:50:12.357854+00:00 mail postfix/submission/smtpd[625]: disconnect from unknown[186.214.xxx.xxx] commands=0/0
  • IPv6 connection:

Example
telnet your_server_ipv6 587
telnet 2604:a880:800:10::xxx:xxxx 587

Expected

mailserver      | 2018-04-08T02:50:15.558027+00:00 mail postfix/submission/smtpd[625]: connect from unknown[2804:7f1:4080:d3a2:xxxx:xxxx:xxxx:xxxx]
mailserver      | 2018-04-08T02:50:16.813053+00:00 mail postfix/submission/smtpd[625]: lost connection after CONNECT from unknown[2804:7f1:4080:d3a2:xxxx:xxxx:xxxx:xxxx]
mailserver      | 2018-04-08T02:50:16.813152+00:00 mail postfix/submission/smtpd[625]: disconnect from unknown[2804:7f1:4080:d3a2:xxxx:xxxx:xxxx:xxxx] commands=0/0

You can check your logs with:

docker-compose logs -f mailserver
or
docker logs -f mailserver

If it is working properly you will see the REAL ip address from your client on the IPv6 test.

Like this:

mailserver | 2018-04-08T02:50:15.558027+00:00 mail postfix/submission/smtpd[625]: connect from unknown[2804:7f1:4080:d3a2:xxxx:xxxx:xxxx:xxxx]

If IPv6nat is not enable, you will see something like this:

mailserver | 2018-04-08T02:50:12.073149+00:00 mail postfix/submission/smtpd[625]: connect from unknown[172.18.xxx.xxx]

@denji
Copy link
Contributor

@denji denji commented Apr 8, 2018

Maybe better comment ipv6nat service-section by default?

It's not like a pretty stable solution enable by default.

@navossoc
Copy link
Contributor Author

@navossoc navossoc commented Apr 8, 2018 •

Maybe better comment ipv6nat service-section by default?

Maybe... I don't know what approach @hardware want to take.
Should we create a wiki to document it? Add a comment on the README.md? I don't know.

Edit: Done, disabled by default, since the network need to be created with ipv6 support also.

I'm just trying show an example of how to add it.

It's not like a pretty stable solution enable by default.

Why did you say that?
Do you have any bad experience using it?

[]'s

@hardware
Copy link
Owner

@hardware hardware commented Apr 8, 2018

Thanks for taking time to document this :)

Maybe... I don't know what approach @hardware want to take.
Should we create a wiki to document it? Add a comment on the README.md ?

I prefer it to be added in the readme.

And with this on top of docker-compose.yml :

version: "3"

# IPv4 network
# docker network create http_network

# IPv4/IPv6 network
# docker network create http_network --ipv6 --subnet "fd00:0000:0000:0000::/64"
# More information here: https://github.com/hardware/mailserver#ipv6-nat

networks:
  http_network:
    external: true
  mail_network:
    external: false
@hardware
Copy link
Owner

@hardware hardware commented May 3, 2018

There any progress on this ?

@navossoc
Copy link
Contributor Author

@navossoc navossoc commented May 3, 2018 •

I'm planning to move the instructions to the readme as agreed and consider the task as finished.
I'll send it tonight.

@navossoc
Copy link
Contributor Author

@navossoc navossoc commented May 3, 2018

Done, please take a look.

Feel free to edit.

@hardware hardware merged commit c79800d into hardware:master May 3, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hardware
Copy link
Owner

@hardware hardware commented May 3, 2018

Perfect, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.