Criar Rotas para Rede

Libera acesso a servidor para maquinas da rede VPN

Cenário:

IP servidor: 192.168.0.15
Rede que precisa acessar o servidor: 192.168.50.0
Gateway que enxerga a rede 192.168.50.0: 192.168.0.7

Habilite repasse de pacotes

echo 1 > /proc/sys/net/ipv4/ip_forward

Libere acesso para servidor no Firewall

iptables -A FORWARD -s 192.168.0.15 -j ACCEPT
iptables -A FORWARD -d 192.168.0.15 -j ACCEPT

Adicione rota de rede

route add -net 192.168.50.0 netmask 255.255.255.0 gw 192.168.0.7 dev eth0

ADMINISTRAÇÃO

Remover rota de rede

route del -net 192.168.50.0 netmask 255.255.255.0 gw 192.168.0.7 dev eth0
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s