Pular para o conteúdo

2 redes internas se enxergarem

Responder tópico
  • Denunciar
  • Indicar

1. 2 redes internas se enxergarem

Enviado em 19/10/2010 - 15:46h

Boa tarde amigos, me desculpem se eu estiver postando minha duvida no lugar errado, mas acontece o seguinte:

Possuo um servidor CentOs com squid iptables
e suas eth´s estao assim:

eth0 192.168.0.1
eth1 172.18.10.1
eth3 internet

ambas redes internas tem acesso a internet, pelo forward

mas eu estava precisando que essas redes se enxergassem por exemplo o ip 192.168.0.235 acessar o ip 172.18.10.197, agora vai minha duvido, por onde fazer isso, pelo route, iptables ou squid.

agradesço desde de ja pela ajuda dos amigos, um forte abraço!

Responder tópico

2. Re: 2 redes internas se enxergarem

Enviado em 19/10/2010 - 15:56h

Vc tem q fazer isso pelo router e pelo firewall. No caso do firewall, se tiver tudo DROP, tem q liberar a passagem pra todo mundo. Mostre ae as tabelas:

# route -n
# iptables -nL

3. Esta ai ...

Enviado em 19/10/2010 - 16:28h

Tabela de Roteamento IP do Kernel
Destino Roteador MáscaraGen. Opções Métrica Ref Uso Iface
172.18.10.197 192.168.0.1 255.255.255.255 UGH 0 0 0 eth0
200.222.86.240 0.0.0.0 255.255.255.248 U 0 0 0 eth3
10.5.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.5.1.0 10.5.10.5 255.255.255.0 UG 0 0 0 eth2
10.10.10.0 10.5.10.111 255.255.255.0 UG 0 0 0 eth2
172.18.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.5.2.0 10.5.10.5 255.255.255.0 UG 0 0 0 eth2
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
172.17.0.0 172.18.10.254 255.255.0.0 UG 0 0 0 eth1
0.0.0.0 200.222.86.241 0.0.0.0 UG 0 0 0 eth3


=======================================================================================

Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x16/0x02
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 192.168.0.0/24 172.18.10.0/24 tcp dpt:139
ACCEPT tcp -- 172.18.10.0/24 192.168.0.0/24 tcp dpt:139
ACCEPT tcp -- 192.168.0.0/24 172.18.10.0/24 tcp dpt:138
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp spt:5900
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp spt:5800
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5800
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5900
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
RH-Firewall-1-INPUT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
ACCEPT esp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT ah -- 0.0.0.0/0 0.0.0.0/0
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:21
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:23
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:443
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

4. Re: 2 redes internas se enxergarem

Enviado em 19/10/2010 - 16:38h

Quando vc dá o ping d uma máquina na outra acontece o q? Teste esse comando abaixo:

# traceroute 192.168.0.235

(Estando na máquina 172.18.10.197).

5. Re: 2 redes internas se enxergarem

Enviado em 19/10/2010 - 16:40h

172.18.10.197 192.168.0.1 255.255.255.255 UGH 0 0 0 eth0
200.222.86.240 0.0.0.0 255.255.255.248 U 0 0 0 eth3
10.5.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.5.1.0 10.5.10.5 255.255.255.0 UG 0 0 0 eth2
10.10.10.0 10.5.10.111 255.255.255.0 UG 0 0 0 eth2
172.18.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.5.2.0 10.5.10.5 255.255.255.0 UG 0 0 0 eth2
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
172.17.0.0 172.18.10.254 255.255.0.0 UG 0 0 0 eth1
0.0.0.0 200.222.86.241 0.0.0.0 UG 0 0 0 eth3

6. route

Enviado em 19/10/2010 - 16:58h

Destino Roteador MáscaraGen. Opções Métrica Ref Uso Iface
172.18.10.197 192.168.0.1 255.255.255.255 UGH 0 0 0 eth0
200.222.86.240 0.0.0.0 255.255.255.248 U 0 0 0 eth3
10.5.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.5.1.0 10.5.10.5 255.255.255.0 UG 0 0 0 eth2
10.10.10.0 10.5.10.111 255.255.255.0 UG 0 0 0 eth2
172.18.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.5.2.0 10.5.10.5 255.255.255.0 UG 0 0 0 eth2
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3
172.17.0.0 172.18.10.254 255.255.0.0 UG 0 0 0 eth1
0.0.0.0 200.222.86.241 0.0.0.0 UG 0 0 0 eth3

7. Re: 2 redes internas se enxergarem

Enviado em 19/10/2010 - 17:23h

Véi... pq vc tá colocando essa saída ae? Num pedi isso, pedi traceroute. Leia direito!

Responder tópico

Responder tópico

Entre na sua conta para responder.

Fazer login para responder