Temat: firewall-2 rutery openwrt. dostep z zewnatrz
Mam 2 rutery.
1. Internet od dostawcy przychodzi po WIFI i idzie z 1 rutera na 2 ruter ustawiony jako AP (Asus WL-500GP).
Mam zewnętrzne IP i chcę aby na zewnątrz był widoczny mój 2 ruter z Asus z openwrt.
Ustawiłem zatem na 1 ruterze (o adresie 192.168.0.1) firewall:
port forwarding :192.168.0.100 TCP 80
gdzie IP openwrt to wlasnie:192.168.0.100
2. Ustawienie interfesow w openwrt (wyłaczony WAN):
config 'switch' 'eth0'
option 'vlan0' '1 2 3 4 5*'
option 'vlan1' '0 5'
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config 'interface' 'lan'
option 'type' 'bridge'
option 'ifname' 'eth0.0'
option 'proto' 'static'
option 'ipaddr' '192.168.0.100'
option 'netmask' '255.255.255.0'
option 'gateway' '192.168.0.1'
option 'dns' 'x.x.x.x' (ukryte IP)
#config 'interface' 'wan'
# option 'proto' 'dhcp'
# option 'ifname' 'eth0.1'
jak ustawic /etc/config/firewall aby 192.168.0.100 był dostepny na zewnatrz?
Moze wpisac na 1 ruterze w DMZ 192.168.0.100? ale co w tego na 2 ruterze (ap) z openwrt?
probowalem:
uci add firewall rule
uci set firewall.@rule[-1]._name=ssh
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=80
uci commit firewall
teraz mam inne wpisy:
config redirect
option src lan
option src_ip 192.168.0.100
# option src_mac 00:11:22:33:44:55
option src_port 80
option src_dport 80
option dest_ip 192.168.0.1
option dest_port 80
option proto tcp
i nadal nie dziala...
co robie nie tak?