Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a dedicated server with a big block of IPv6 IPs.

I'd like to be able to use a randomized IPv6 IP within that block and run all outgoing connections through that single selected IP.

I've already accomplished the same thing with IPv4 by using iptables:

iptables -t nat -A POSTROUTING -p tcp -m tcp ! -s XXX.XXX.XXX.XXX -j SNAT --to-source XXX.XXX.XXX.XXX

Since ip6tables doesn't seem to have a NAT table, I started looking for alternatives... One alternative I found is : NATP66 .

If I installed and compiled everything for NATP66 to work I think I could probably use this ip6tables rule:

ip6tables -t nat66 -A POSTROUTING -p tcp -m tcp ! -s IPV6_IP_GOES_HERE -j SNAT66 --to-range IPV6_IP_GOES_HERE

The thing I didn't like about NATP66 is the fact that I have to recompile the kernel in order to make it work (and I really want to stay away from having to do that unless it was my last option).

share|improve this question

closed as not a real question by HopelessN00b, Brent Pabst, Scott Pack, rnxrx, Ward Nov 9 '12 at 3:38

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

May one ask WHY you're trying to do this? – MadHatter Nov 8 '12 at 7:33

I recommend to just add the addresses you want to use to a real or dummy interface and then just configure your application to use them.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.