Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gnap routing - gateway [RESOLVIDO]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Portuguese
View previous topic :: View next topic  
Author Message
hidrogen
n00b
n00b


Joined: 08 Mar 2007
Posts: 51

PostPosted: Thu May 10, 2007 8:21 am    Post subject: gnap routing - gateway [RESOLVIDO] Reply with quote

Oi

Estou a tentar usar o GNAP como gateway mas estou com o seguinte problema:
O computador com o gateway GNAP consegue pingar os computadores dentro e fora da LAN, mas os computadores da LAN não conseguem pingar os computadores fora da LAN.

Diagrama da rede:

Code:
 PC da LAN (eth0: 192.168.5.125) <-----> (eth0: 192.168.5.254) GNAP GATEWAY (eth1: 193.111.111.99) <----------> (193.111.111.254)  Gateway de outra rede


/etc/conf.d/net do GNAP gateway:

Code:
modules=( "iproute2" )

# The internal interface
ipaddr_eth0=("192.168.5.254 netmask 255.255.255.0" )

# The external interface
ipaddr_eth1=( "193.111.111.99 netmask 255.255.255.0" )
iproute_eth1=( "default via 193.111.111.254"
)



/etc/conf.d/net do PC dentro da LAN

Code:
config_eth0=( "192.168.5.125 netmask 255.255.255.0 brd 192.168.5.255" )
routes_eth0=( "default via 192.168.5.254" )



Obrigado
Back to top
View user's profile Send private message
hidrogen
n00b
n00b


Joined: 08 Mar 2007
Posts: 51

PostPosted: Mon May 14, 2007 4:06 pm    Post subject: Re: gnap routing - gateway [RESOLVIDO] Reply with quote

hidrogen wrote:
Oi

Estou a tentar usar o GNAP como gateway mas estou com o seguinte problema:
O computador com o gateway GNAP consegue pingar os computadores dentro e fora da LAN, mas os computadores da LAN não conseguem pingar os computadores fora da LAN.

Diagrama da rede:

Code:
 PC da LAN (eth0: 192.168.5.125) <-----> (eth0: 192.168.5.254) GNAP GATEWAY (eth1: 193.111.111.99) <----------> (193.111.111.254)  Gateway de outra rede


/etc/conf.d/net do GNAP gateway:

Code:
modules=( "iproute2" )

# The internal interface
ipaddr_eth0=("192.168.5.254 netmask 255.255.255.0" )

# The external interface
ipaddr_eth1=( "193.111.111.99 netmask 255.255.255.0" )
iproute_eth1=( "default via 193.111.111.254"
)



/etc/conf.d/net do PC dentro da LAN

Code:
config_eth0=( "192.168.5.125 netmask 255.255.255.0 brd 192.168.5.255" )
routes_eth0=( "default via 192.168.5.254" )



Obrigado



Solução:


iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portuguese All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum