fonera mit gw:
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ath0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
iptables -vL
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- any any anywhere anywhere state INVALID
1252 79386 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
0 0 DROP tcp -- any any anywhere anywhere tcp option=!2 flags:SYN/SYN
14588 778K input_rule all -- any any anywhere anywhere
14588 778K LAN_ACCEPT all -- any any anywhere anywhere
0 0 ACCEPT icmp -- any any anywhere anywhere
0 0 ACCEPT gre -- any any anywhere anywhere
0 0 REJECT tcp -- any any anywhere anywhere reject-with tcp-reset
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-port-unreachable
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- any any anywhere anywhere state INVALID
0 0 TCPMSS tcp -- any any anywhere anywhere tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU
0 0 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
0 0 forwarding_rule all -- any any anywhere anywhere
0 0 ACCEPT all -- eth0 eth0 anywhere anywhere
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- any any anywhere anywhere state INVALID
853 111K ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
13979 699K output_rule all -- any any anywhere anywhere
13979 699K ACCEPT all -- any any anywhere anywhere
0 0 REJECT tcp -- any any anywhere anywhere reject-with tcp-reset
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-port-unreachable
Chain LAN_ACCEPT (1 references)
pkts bytes target prot opt in out source destination
14588 778K ACCEPT all -- any any anywhere anywhere
Chain forwarding_rule (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere anywhere
Chain forwarding_wan (0 references)
pkts bytes target prot opt in out source destination
Chain input_rule (1 references)
pkts bytes target prot opt in out source destination
Chain input_wan (0 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:22
Chain output_rule (1 references)
pkts bytes target prot opt in out source destination
cat /etc/firewall.user
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
iptables -F input_rule
iptables -F output_rule
iptables -F forwarding_rule
iptables -t nat -F prerouting_rule
iptables -t nat -F postrouting_rule
# The following chains are for traffic directed at the IP of the
# WAN interface
iptables -F input_wan
iptables -F forwarding_wan
iptables -t nat -F prerouting_wan
### Open port to WAN
## -- This allows port 22 to be answered by (dropbear on) the router
iptables -t nat -A prerouting_wan -p tcp --dport 22 -j ACCEPT
iptables -A input_wan -p tcp --dport 22 -j ACCEPT
### Port forwarding
## -- This forwards port 8080 on the WAN to port 80 on 192.168.1.2
# iptables -t nat -A prerouting_wan -p tcp --dport 8080 -j DNAT --to 192.168.1.2:80
# iptables -A forwarding_wan -p tcp --dport 80 -d 192.168.1.2 -j ACCEPT
### DMZ
## -- Connections to ports not handled above will be forwarded to 192.168.1.2
# iptables -t nat -A prerouting_wan -j DNAT --to 192.168.1.2
# iptables -A forwarding_wan -d 192.168.1.2 -j ACCEPT
###Freifunk
iptables -A forwarding_rule -j ACCEPT
cat /etc/olsrd.conf
DebugLevel 1
IpVersion 4
AllowNoInt yes
Pollrate 0.1
TcRedundancy 2
MprCoverage 7
LinkQualityFishEye 1
LinkQualityWinSize 100
LinkQualityDijkstraLimit 0 6.0
LoadPlugin "olsrd_dyn_gw_plain.so.0.4"
{
}
LoadPlugin "olsrd_nameservice.so.0.2"
{
PlParam "name" "AP-FON16"
PlParam "hosts-file" "/etc/hosts"
PlParam "suffix" ".nirvana.freifunk.net"
}
LoadPlugin "olsrd_httpinfo.so.0.1"
{
PlParam "port" "8080"
PlParam "Net" "192.168.0.0 255.255.255.0"
PlParam "Net" "10.0.0.0 255.255.0.0"
}
Hna4
{
192.168.0.1 0.0.0.0
}
IpcConnect
{
MaxConnections 1
Host 127.0.0.1
}
LinkQualityLevel 2
UseHysteresis no
Interface "ath0"
{
HelloInterval 4.0
HelloValidityTime 72.0
TcInterval 3.0
TcValidityTime 216.0
MidInterval 12.0
MidValidityTime 216.0
HnaInterval 12.0
HnaValidityTime 72.0
}
# Add your addons (e.g. plugins) to olsrd.conf here,
# addons for interfaces in /etc/local.olsrd.conf.ath0