Re: [FUG-BR] Uma ajuda para NAT com PF
rapaz, depois de tudo que vi (saídas dos comandos que renato falou), recomendo começar do zero. a iface com IP válido é vge0, isso ? cria um pf.conf beeem simples com: nat on vge0 from any to any -> (vge0) salva e carrega. tenta então. só mais uma coisa, não vi nada sobre como tá a rede no cliente (notebook se não engano). tais diretamente logado no roteador ou via ssh ? matheus -- We will call you cygnus, The God of balance you shall be A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? http://en.wikipedia.org/wiki/Posting_style - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Uma ajuda para NAT com PF
2009/8/6 Renato Botelho > # pfctl -sa > > Do seu laptop > > # traceroute -n www.uol.com.br > > -- > Renato Botelho > - > Histórico: http://www.fug.com.br/historico/html/freebsd/ > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > pfctl -sa gera bastante linhas: hobbit# pfctl -sa TRANSLATION RULES: nat on vge0 from to any -> (vge0) round-robin FILTER RULES: scrub in all fragment reassemble pass all flags S/SA keep state No queue in use INFO: Status: Disabled for 0 days 00:01:33 Debug: Urgent State Table Total Rate current entries0 searches 00.0/s inserts00.0/s removals 00.0/s Counters match 00.0/s bad-offset 00.0/s fragment 00.0/s short 00.0/s normalize 00.0/s memory 00.0/s bad-timestamp 00.0/s congestion 00.0/s ip-option 00.0/s proto-cksum00.0/s state-mismatch 00.0/s state-insert 00.0/s state-limit00.0/s src-limit 00.0/s synproxy 00.0/s TIMEOUTS: tcp.first 120s tcp.opening 30s tcp.established 86400s tcp.closing 900s tcp.finwait 45s tcp.closed 90s tcp.tsdiff 30s udp.first60s udp.single 30s udp.multiple 60s icmp.first 20s icmp.error 10s other.first 60s other.single 30s other.multiple 60s frag 30s interval 10s adaptive.start 6000 states adaptive.end 12000 states src.track 0s LIMITS: stateshard limit1 src-nodes hard limit1 frags hard limit 5000 tableshard limit 1000 table-entries hard limit 20 TABLES: rede_pref OS FINGERPRINTS: 696 fingerprints loaded hobbit# porém o tracert do meu note só alcançou o IP do servidor, apos isso só apareceu asteriscos e esgotado o tempo limite, mas o traceroute no servidor para um ip externo foi -- ENIO RODRIGO MARCONCINI www.Enio.Pro.Br skype: eniorm > FreeBSD -:- OpenBSD -:- Slackware > Coleções Marcas de Cigarros < Obi-Wan has taught you well - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Uma ajuda para NAT com PF
2009/8/6 Enio Marconcini -:- www.Enio.Pro.Br -:- : > 2009/8/6 Renato Botelho > >> pfctl -Fa && pfctl -f /etc/pf.conf >> >> depois disso, execute e cole os resultados >> >> # pfctl -sa >> # sysctl net.inet.ip.forwarding >> # ifconfig >> # netstat -nr >> >> -- >> Renato Botelho >> - >> Histórico: http://www.fug.com.br/historico/html/freebsd/ >> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd >> > > aí vai > > hobbit# pfctl -Fa > rules cleared > nat cleared > 0 tables deleted. > altq cleared > 0 states cleared > source tracking entries cleared > pf: statistics cleared > pf: interface flags reset > hobbit# > > (para checar a sintaxe) > hobbit# pfctl -n -f /etc/pf.conf > hobbit# > > (carrego as regras) > hobbit# pfctl -f /etc/pf.conf > hobbit# > > (show nat) > hobbit# pfctl -sn # pfctl -sa Do seu laptop # traceroute -n www.uol.com.br -- Renato Botelho - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Uma ajuda para NAT com PF
2009/8/6 Renato Botelho > pfctl -Fa && pfctl -f /etc/pf.conf > > depois disso, execute e cole os resultados > > # pfctl -sa > # sysctl net.inet.ip.forwarding > # ifconfig > # netstat -nr > > -- > Renato Botelho > - > Histórico: http://www.fug.com.br/historico/html/freebsd/ > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > aí vai hobbit# pfctl -Fa rules cleared nat cleared 0 tables deleted. altq cleared 0 states cleared source tracking entries cleared pf: statistics cleared pf: interface flags reset hobbit# (para checar a sintaxe) hobbit# pfctl -n -f /etc/pf.conf hobbit# (carrego as regras) hobbit# pfctl -f /etc/pf.conf hobbit# (show nat) hobbit# pfctl -sn nat on vge0 from to any -> (vge0) round-robin hobbit# (pingo um dominio, e resolve, entao meu dns-cache está OK) hobbit# ping -c1 www.google.com.br PING www.l.google.com (74.125.67.147): 56 data bytes 64 bytes from 74.125.67.147: icmp_seq=0 ttl=240 time=147.859 ms (vou no note que pertente a lan, pingo no google e tbm resolve) c:\>ping www.google.com.br Disparando contra www.1.google.com [74.125.67.147] com 32 bytes de dados (no servidor) hobbit# sysctl net.inet.ip.forwarding net.inet.ip.forwarding: 1 hobbit# hobbit# ifconfig vr0: flags=8843 metric 0 mtu 1500 options=2808 ether 00:17:31:27:1c:06 inet 192.168.0.13 netmask 0xff00 broadcast 192.168.0.255 media: Ethernet autoselect (100baseTX ) status: active vge0: flags=8843 metric 0 mtu 1500 options=1b ether 00:0c:42:1a:56:14 inet 200.200.200.0 netmask 0xfff8 broadcast 200.200.200.255 media: Ethernet autoselect (100baseTX ) status: active vge1: flags=8802 metric 0 mtu 1500 options=1b ether 00:0c:42:1a:56:15 media: Ethernet autoselect (none) status: no carrier vge2: flags=8802 metric 0 mtu 1500 options=1b ether 00:0c:42:1a:56:16 media: Ethernet autoselect (none) status: no carrier vge3: flags=8843 metric 0 mtu 1500 options=1b ether 00:0c:42:1a:56:17 inet 172.16.30.1 netmask 0xfff0 broadcast 172.16.30.15 media: Ethernet autoselect (1000baseTX ) status: active plip0: flags=108810 metric 0 mtu 1500 pfsync0: flags=0<> metric 0 mtu 1460 syncpeer: 224.0.0.240 maxupd: 128 lo0: flags=8049 metric 0 mtu 16384 inet 127.0.0.1 netmask 0xff00 pflog0: flags=0<> metric 0 mtu 33204 as placas vge1 e 2 não estão em uso, vr0 está conectado na minha LAN que conecta ao meu desktop, vge0 conectado ao roteador, e vge3 ao meu notebook /etc/rc.conf o defaultrouter está setado para o IP do roteador, o netstat -nr mostra corretamente o IP do meu default router o que eu acho mais estranho de tudo é que tenho seguido o padrão que usei no pf.conf do OpenBSD e que consegui natear conexões, ainda por cima usando block all, depois fui liberando o que precisava, no caso agora do PF no Free eu nem deixando o final com pass all nao funciona -- ENIO RODRIGO MARCONCINI www.Enio.Pro.Br skype: eniorm > FreeBSD -:- OpenBSD -:- Slackware > Coleções Marcas de Cigarros < Obi-Wan has taught you well - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Uma ajuda para NAT com PF
2009/8/6 Enio Marconcini -:- www.Enio.Pro.Br -:- : > amigos, estou precisando de um help com PF e NAT, na qual antes de qualquer > pessoa dizer que o que falta é leitura ou erros de sintaxe quero deixar > claro que segui o padrão que já havia conseguido fazer com o pf.conf no > OpenBSD > > meus passos foram: > > 1) recompilar o kernel com: > device pf > device pflog > device pfsync > options ALTQ > options ALTQ_CBQ > options ALTQ_RED > options ALTQ_RIO > options ALTQ_HFSC > options ALTQ_PRIQ > options ALTQ_NOPCC > (falta alguma coisa aqui em cima?) > > minhas regras são simples, por enquanto, apenas ativar o NAT para um pc por > tras do servidor navegar, porém não consigo no FreeBSD > > eis minhas regras de pf.cong > > # MACROS > nic_interna = "vge3" > nic_externa = "vge0" > # TABELAS > table { 172.16.30.0/28 } > # OPCOES > set skip on lo0 > set block-policy return > scrub in all > # NAT > nat on $nic_externa from to any -> ($nic_externa) > # > pass all > > # pfctl -Fa && pfctl /etc/pf.conf pfctl -Fa && pfctl -f /etc/pf.conf depois disso, execute e cole os resultados # pfctl -sa # sysctl net.inet.ip.forwarding # ifconfig # netstat -nr -- Renato Botelho - Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
Re: [FUG-BR] Uma ajuda
bem.. eu "afinei" um bocadinho a pesquisa. Alguns links são bem claros, como (por exemplo): http://72.14.207.104/search?q=cache:e3yE0aFO4tMJ:64.62.136.189/freebsd%40fug .com.br/msg05773.html+ipfw+caixa+conectividade+social&hl=pt-BR&ct=clnk&cd=5 mas existem realmente outros, alguns com exemplos bem claros: http://www.google.com/search?hl=pt-BR&rls=WZPA%2CWZPA%3A2006-01%2CWZPA%3Aen&; q=ipfw+caixa+conectividade+social&lr= divirta-se :) flames > /dev/null Original Message: - From: BRUNNO [EMAIL PROTECTED] Date: Tue, 7 Feb 2006 15:54:31 -0200 To: Freebsd@fug.com.br Subject: [FUG-BR] Uma ajuda Estou com um pequeno problena na Conectividade Social da Caixa , quando ativo meu squid ela para de funcionar já tentei varias regras e nenhuma da certo.. # mail2web - Check your email from the web at http://mail2web.com/ . ___ freebsd mailing list freebsd@fug.com.br http://lists.fug.com.br/listinfo.cgi/freebsd-fug.com.br
Re: [FUG-BR] Uma ajuda
o google é seu amigo, eu fui dar uma vista d´olhos e achei uns links interessantes que provávelmente respondem sua pergunta (veja do 3o em diante): http://google.vtnc.org/ http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=WZPA,WZPA:2006- 01,WZPA:en&q=ipfw+caixa flames > /dev/null Original Message: - From: BRUNNO [EMAIL PROTECTED] Date: Tue, 7 Feb 2006 15:54:31 -0200 To: Freebsd@fug.com.br Subject: [FUG-BR] Uma ajuda Estou com um pequeno problena na Conectividade Social da Caixa , quando ativo meu squid ela para de funcionar já tentei varias regras e nenhuma da certo.. mail2web - Check your email from the web at http://mail2web.com/ . ___ freebsd mailing list freebsd@fug.com.br http://lists.fug.com.br/listinfo.cgi/freebsd-fug.com.br