
		LSSilva
		
		(usa Outra)
		
		Enviado em 28/12/2017 - 09:47h 
		ferezini escreveu:
Vou te passar abaixo as configurações que fiz:
interfaces:
auto eth0
iface eth0 inet static
   address 192.168.15.98
   netmask 255.255.255.0
   network 192.168.15.0
   broadcast 192.168.15.255
   gateway 192.168.15.1 
#eth1 (Rede Local)
auto eth1
iface eth1 inet static
   address 192.168.15.99
   netmask 255.255.255.0
   network 192.168.15.0
   broadcast 192.168.15.255
iptables: 
#!/bin/bash
IPTABLES="/sbin/iptables"
IFCONFIG="/sbin/ifconfig"
 modprobe iptable_nat
 modprobe ip_nat_ftp
 modprobe ipt_REDIRECT
 modprobe ipt_REJECT
 modprobe ip_conntrack
 modprobe ip_conntrack_ftp
#
# Network
#
 external_if="eth0"
 external_ip="192.168.15.98"
 internal_if="eth1"
 internal_ip="192.168.15.98"
 internal_net="192.168.0.0/24"
 $IPTABLES -A INPUT -i lo -j ACCEPT
 $IPTABLES -A INPUT -i $internal_if -j ACCEPT
 $IPTABLES -A INPUT -i $external_if -j ACCEPT
 $IPTABLES -t nat -A POSTROUTING -o $internal_if -s 192.168.15.0/24 -j MASQUERADE
 $IPTABLES -t nat -A POSTROUTING -o $external_if -s 192.168.15.0/24 -j MASQUERADE
O que preciso é que o roteador receba na wan o sinal enviado pelo eth1, lá passei o GW 192.168.15.98, porém não da acesso.  
Terá que modificar a range do eth1, coloque, por exemplo, na faixa 1; terá também que mudar seu firewall, ajuste desta forma:
interfaces:
auto eth0
iface eth0 inet static
   address 192.168.15.98
   netmask 255.255.255.0
   network 192.168.15.0
   broadcast 192.168.15.255
   gateway 192.168.15.1 
#eth1 (Rede Local)
auto eth1
iface eth1 inet static
   address 192.168.1.1
   netmask 255.255.255.0
   network 192.168.1.0
   broadcast 192.168.1.255
iptables: 
#!/bin/bash
IPTABLES="/sbin/iptables"
IFCONFIG="/sbin/ifconfig"
 modprobe iptable_nat
 modprobe ip_nat_ftp
 modprobe ipt_REDIRECT
 modprobe ipt_REJECT
 modprobe ip_conntrack
 modprobe ip_conntrack_ftp
#
# Network
#
 external_if="eth0"
 internal_if="eth1"
 internal_net="192.168.1.0/24"
#Se estiver com política accept, isso abaixo não é necessário. Logo seu firewall pode ter apenas duas linhas
 #$IPTABLES -A INPUT -i lo -j ACCEPT
 #$IPTABLES -A INPUT -i $internal_if -j ACCEPT
 #$IPTABLES -A INPUT -i $external_if -j ACCEPT
#Ativa comutação de pacotes no kernel
echo 1 > /proc/sys/net/ipv4/ip_forward
#Faz SNAT para interface externa
$IPTABLES -t nat -A POSTROUTING -o $external_if -s $internal_net -j MASQUERADE
Aí no router você pode colocar o ip 192.168.0.2, com gateway 192.168.0.1 e dns na WAN que deve funcionar. Vale lembrar que este exemplo de firewall é totalmente permissivo e não é indicado.