[MASOCH-L] [OT?] Nat no XP

Christian Lyra lyra at pop-pr.rnp.br
Thu Aug 30 20:05:32 BRT 2007


Ois,

Por um motivo que não vem ao caso preciso fazer com que um windows XP 
faça nat.  O windows deve fazer nat de pacotes que chegam por uma 
conexão OPENVPN para a internet.

A receita usual para isso é:

1) Modify Registry Entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
IPEnableRouter=1

2) net stop remoteaccess // Stop the RAS Service
3) netsh routing ip nat install
4) netsh routing ip nat add interface "Local Area Connection" full
5) netsh routing ip nat add interface "YOUR OPEN VPN TAP NIC" private
6) netsh routing ip nat add interface Internal private
7) net start remoteaccess

pois bem... por alguma razao bizarra o roteamento funciona, só que o nat 
não, ou seja, de uma maquina atras da vpn eu envio pings para um host 
qualquer na internet. No host de destino eu vejo os pacotes chegarem 
com o ip invalido da vpn e não com o ip valido do XP.

se eu executo o comando: netsh routing ip nat show global eu recebo como 
resposta um "NAT must be installed first.". Mas isso foi feito no passo 
3!!!!!  Alguem tem alguma dica?

e depois dizem que linux é dificil... para fazer a mesma coisa:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat - A POSTROUTING -o <iface> -j MASQUERADE

-- 
Christian Lyra
POP-PR - RNP

http://lyra.soueu.com.br

  Why are programmers non-productive?
  Because their time is wasted in meetings. 
  Why are programmers rebellious?
  Because the management interferes too much. 
  Why are the programmers resigning one by one?
  Because they are burnt out. 
  Having worked for poor management, they no longer value their jobs. 
						The Tao Of Programing


More information about the masoch-l mailing list