iptables on ovislink WL1120AP
Hi, I have this AP in mode client. I want to redirect the requirements from internet to webserver, but I´m still doing something wrong...
IPTABLES:
#!/bin/sh
#zrusime bridge
ifconfig br0 down
brctl delbr br0
#nastavime interfaces a routes
ETH0=192.168.1.1
ETH0MASK=255.255.255.0
WLAN0=10.32.xxx.xxx
WLAN0MASK=255.255.255.xxx
DEFGW=10.32.139.xxx
ifconfig eth0 $ETH0 netmask $ETH0MASK
ifconfig eth0:1 192.168.100.252
ifconfig wlan0 $WLAN0 netmask $WLAN0MASK
route add default gw $DEFGW
#zacneme routovat
echo 1 > /proc/sys/net/ipv4/ip_forward
#firewall
iptables -F INPUT
iptables -A INPUT -s 192.168.100.254 -j ACCEPT
iptables -A INPUT -p tcp --dport 23 -j REJECT
iptables -A INPUT -i INET_IFACE -p TCP --dport 80 -j ACCEPT
iptables -t nat -F
iptables -S ALLOW_PORTS -m state --state NEW -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp -d 62.240.xxx.xxx --dport 80 -j DNAT --to-destination 192.168.1.10:80
iptables -t nat -I POSTROUTING -s 192.168.1.0/24 -d ! 192.168.1.0/24 -j SNAT --to 10.32.xxx.xxx
#zapneme dhcpd
#touch /var/lib/misc/udhcpd.leases
#udhcpd
dhcpd eth0
#staticke arp
/etc/arp.conf
|