Jump to content
Калькуляторы

CG-NAT на nix'aх

Задался вопросом, а есть ли на nix'aх аналог carrier grade (CG-NAT) как у CISCO ?

 

Из функционала хотелось бы:

1. Соотношение серых IP к 1 белому. 

2. Привязка внешнего IP-ка к сессии, чтоб не было плавающего внешнего адреса.

 

Share this post


Link to post
Share on other sites

1. iptables -J SNAT -s x.x.x.x/y --to y.y.y.y-z.z.z.z

2. iptables -J SNAT --persistent (привязка к SRC IP по хэшу)

 

Share this post


Link to post
Share on other sites

Ну это же не сгнат )))

 

Share this post


Link to post
Share on other sites

Ну что товарищ хотел, то я и написал.

Уточнил бы требования, а то может имеется ввиду всего пара гигабит, которые любой тазик на iptables промолотит.

 

Share this post


Link to post
Share on other sites

ну действительно же, под cgnat можно понимать всё что угодно

кто-то под этим понимает матчинг обратного трафика без учёта src_ip, кто-то ассоциирует с PBA. нужно действительно чётко описывать что надо (какие фичи нужны)

Share this post


Link to post
Share on other sites

   DNETMAP
       The DNETMAP target allows dynamic two-way 1:1 mapping of IPv4  subnets.
       A  single  rule  can  map  a private subnet to a shorter public subnet,
       creating  and  maintaining  unambiguous   private-public   IP   address
       bindings.  The  second  rule  can be used to map new flows to a private
       subnet according to maintained bindings.  The target  allows  efficient
       public IPv4 space usage and unambiguous NAT at the same time.

Содержится в iptables xtables-addons

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now