also ich packs net...*kopfkratz*
hallo mike,
ich wollte den primitivansatz 
von früher mit der zone based firewall (ich nenn das ding ab jetzt "zbfw") so weit wie möglich imitieren und bin dabei auf was lustiges gestoßen: der openwrt router weigert sich am ppp-link zu maskieren.
so ein lauser... 

genaugenommen hab ich im klicki-bunti das gesetzt:
		
		 
		   		 
			 
- openwrt1209_zbfw_comment1.png (135.63 KiB) 29634-mal betrachtet
 mit diesem setup sieht die POSTROUTING chain voll ok aus...:
- Code: Alles auswählen
- # iptables -t nat -nvL POSTROUTING
 Chain POSTROUTING (policy ACCEPT 10 packets, 606 bytes)
 pkts bytes target     prot opt in     out     source               destination
 17  1122 postrouting_rule  all  --  *      *       0.0.0.0/0            0.0.0.0/0
 8   490 zone_lan_nat  all  --  *      br-lan  0.0.0.0/0            0.0.0.0/0
 3   164 zone_lan_st_nat  all  --  *      eth0.2  0.0.0.0/0            0.0.0.0/0
 6   468 zone_wan_nat  all  --  *      pptp-A1  0.0.0.0/0            0.0.0.0/0
 
 # iptables -t nat -nvL postrouting_rule
 Chain postrouting_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination
 
 # iptables -t nat -nvL zone_lan_nat
 Chain zone_lan_nat (1 references)
 pkts bytes target     prot opt in     out     source               destination
 
 # iptables -t nat -nvL zone_lan_st_nat
 Chain zone_lan_st_nat (1 references)
 pkts bytes target     prot opt in     out     source               destination
 
 # iptables -t nat -nvL zone_wan_nat
 Chain zone_wan_nat (1 references)
 pkts bytes target     prot opt in     out     source               destination
 6   468 MASQUERADE  all  --  *      *       0.0.0.0/0            0.0.0.0/0
...ich komm aber aus dem lan (rechner-ip: 192.168.1.146/24) nicht ins inet:
- Code: Alles auswählen
- >ping -c 4  8.8.8.8
 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
 
 --- 8.8.8.8 ping statistics ---
 4 packets transmitted, 0 received, 100% packet loss, time 2999ms
und wenn man am modem (bei mir aktuell ein tg585v7) mit einem kontrollrechner mitsnifft, dann sieht man, daĂź die pings eben unmaskiert rausgehen:
		
		 
		   		 
			 
- openwrt1209_zbfw_ping_no_masq.png (24.14 KiB) 29634-mal betrachtet
 es kommt aber noch lustiger:
wenn man jetzt völlig unnötigerweise (die lan zone hat ja bereits fürs forwarding eine accept policy) nur das inter-zone forwarding lan -> wan explizit setzt (der rest bleibt gleich), konkret also das macht:
		
		 
		   		 
			 
- openwrt1209_zbfw_lan_wan_forw.png (19.61 KiB) 29634-mal betrachtet
 dann ändert sich zwar in der POSTROUTING chain genau nix...:
- Code: Alles auswählen
- # iptables -t nat -nvL POSTROUTING
 Chain POSTROUTING (policy ACCEPT 2 packets, 116 bytes)
 pkts bytes target     prot opt in     out     source               destination
 4   248 postrouting_rule  all  --  *      *       0.0.0.0/0            0.0.0.0/0
 0     0 zone_lan_nat  all  --  *      br-lan  0.0.0.0/0            0.0.0.0/0
 3   164 zone_lan_st_nat  all  --  *      eth0.2  0.0.0.0/0            0.0.0.0/0
 1    84 zone_wan_nat  all  --  *      pptp-A1  0.0.0.0/0            0.0.0.0/0
 
 # iptables -t nat -nvL postrouting_rule
 Chain postrouting_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination
 
 # iptables -t nat -nvL zone_lan_nat
 Chain zone_lan_nat (1 references)
 pkts bytes target     prot opt in     out     source               destination
 
 # iptables -t nat -nvL zone_lan_st_nat
 Chain zone_lan_st_nat (1 references)
 pkts bytes target     prot opt in     out     source               destination
 
 # iptables -t nat -nvL zone_wan_nat
 Chain zone_wan_nat (1 references)
 pkts bytes target     prot opt in     out     source               destination
 1    84 MASQUERADE  all  --  *      *       0.0.0.0/0            0.0.0.0/0
...aber das masquerading funkt auf einmal, und die pings gehen sauber durch, s.a. bunti im nächsten post.
wir halten somit fest:
ab sofort wird das maquerading/nat nicht mehr in den nat tables, sondern in den filter tables aktiviert... 

spaĂź beiseite- hast du vielleicht eine idee, was da abgeht?
lg
zid