1

Temat: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Witam,
Coś dziwnego dzieje mi się z firewall-em, po dodaniu reguły otwiera mi się zarówno port 443 jak i 80.

Podstawowe ustawienia firewall (brak „dziur”):

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option block_static_ip_mismatches '1'
        option force_router_dns '1'
        option drop_invalid '1'

config zone
        option name 'lan'
        option network 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'wan'
        list network 'wan'
        list network 'wan2'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option _name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config include
        option path '/etc/firewall.user'

Dodanie poniższego przekierowania otwiera port 443:

config redirect
        option _name 'Redir-WAN-xx'
        option src 'wan'
        option src_dport '443'
        option proto 'tcp'
        option dest 'lan'
        option dest_ip '192.168.1.xx'
        option dest_port '7000'

config redirect
        option _name 'Redir-LAN-xx'
        option src 'lan'
        option src_dport '443'
        option src_dip 'yy.yy.yy.yy'
        option proto 'tcp'
        option dest_ip '192.168.1.xx'
        option dest_port '7000'

Dodanie poniższej reguły otwiera także port 80:

config rule
       option _name 'Allow-WAN-xx'
       option src 'wan'
       option src_dport '443'
       option proto 'tcp'
       option target 'ACCEPT'

Czy ma ktoś taki problem i wie jak go rozwiązać?

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

2

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Dodaj tą regułę, zrestartuj firewall i pokaż wynik iptables -v -L. Czym sprawdzasz że 80 jest otwarte? I mam nadzieje że nie robisz to od strony lanu sprawdzając wan.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Sprawdzam mxtoolbox.com oraz z drugiego kompa podpiętego bezpośrenio do internetu przez inne łącze.

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
   13   728 ACCEPT     all  --  any    any     anywhere             anywhere            ctstate RELATED,ESTABLISHED
    0     0 DROP       all  --  any    any     anywhere             anywhere            ctstate INVALID
    0     0 ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 syn_flood  tcp  --  any    any     anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN
    1   351 input_rule  all  --  any    any     anywhere             anywhere
    1   351 input      all  --  any    any     anywhere             anywhere

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere            ctstate RELATED,ESTABLISHED
    0     0 DROP       all  --  any    any     anywhere             anywhere            ctstate INVALID
    0     0 forwarding_rule  all  --  any    any     anywhere             anywhere
    0     0 forward    all  --  any    any     anywhere             anywhere
    0     0 reject     all  --  any    any     anywhere             anywhere

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
   13  1584 ACCEPT     all  --  any    any     anywhere             anywhere            ctstate RELATED,ESTABLISHED
    0     0 DROP       all  --  any    any     anywhere             anywhere            ctstate INVALID
    0     0 ACCEPT     all  --  any    lo      anywhere             anywhere
    0     0 output_rule  all  --  any    any     anywhere             anywhere
    0     0 output     all  --  any    any     anywhere             anywhere

Chain forward (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 zone_lan_forward  all  --  br-lan any     anywhere             anywhere
    0     0 zone_wan_forward  all  --  eth0.2 any     anywhere             anywhere

Chain forwarding_hotspot (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain forwarding_lan (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain forwarding_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 nat_reflection_fwd  all  --  any    any     anywhere             anywhere

Chain forwarding_wan (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain input (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 zone_lan   all  --  br-lan any     anywhere             anywhere
    1   351 zone_wan   all  --  eth0.2 any     anywhere             anywhere

Chain input_hotspot (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain input_lan (1 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 (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain nat_reflection_fwd (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     tcp  --  any    any     192.168.1.0/24       192.168.1.xx     tcp dpt:7000

Chain output (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 zone_lan_ACCEPT  all  --  any    any     anywhere             anywhere
    0     0 zone_wan_ACCEPT  all  --  any    any     anywhere             anywhere
    0     0 zone_hotspot_ACCEPT  all  --  any    any     anywhere             anywhere

Chain output_rule (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain reject (5 references)
 pkts bytes target     prot opt in     out     source               destination
    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 syn_flood (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 RETURN     tcp  --  any    any     anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50
    0     0 DROP       all  --  any    any     anywhere             anywhere

Chain zone_hotspot (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere            udp spts:bootps:bootpc dpts:bootps:bootpc limit: avg 10/sec burst 5
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:domain limit: avg 1000/sec burst 5
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpt:domain limit: avg 1000/sec burst 5
    0     0 input_hotspot  all  --  any    any     anywhere             anywhere
    0     0 zone_hotspot_REJECT  all  --  any    any     anywhere             anywhere

Chain zone_hotspot_ACCEPT (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain zone_hotspot_DROP (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 LOG        all  --  any    any     anywhere             anywhere            limit: avg 10/min burst 5 LOG level warning prefix `DROP(hotspot):'

Chain zone_hotspot_REJECT (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 LOG        all  --  any    any     anywhere             anywhere            limit: avg 10/min burst 5 LOG level warning prefix `REJECT(hotspot):'

Chain zone_hotspot_forward (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 zone_wan_ACCEPT  all  --  any    any     anywhere             anywhere
    0     0 forwarding_hotspot  all  --  any    any     anywhere             anywhere
    0     0 zone_hotspot_REJECT  all  --  any    any     anywhere             anywhere

Chain zone_lan (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 input_lan  all  --  any    any     anywhere             anywhere
    0     0 zone_lan_ACCEPT  all  --  any    any     anywhere             anywhere

Chain zone_lan_ACCEPT (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  any    br-lan  anywhere             anywhere
    0     0 ACCEPT     all  --  br-lan any     anywhere             anywhere

Chain zone_lan_DROP (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  any    br-lan  anywhere             anywhere
    0     0 DROP       all  --  br-lan any     anywhere             anywhere

Chain zone_lan_REJECT (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 reject     all  --  any    br-lan  anywhere             anywhere
    0     0 reject     all  --  br-lan any     anywhere             anywhere

Chain zone_lan_forward (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     tcp  --  any    any     anywhere             192.168.1.xx     tcp dpt:7000
    0     0 zone_wan_ACCEPT  all  --  any    any     anywhere             anywhere
    0     0 forwarding_lan  all  --  any    any     anywhere             anywhere
    0     0 zone_lan_REJECT  all  --  any    any     anywhere             anywhere

Chain zone_wan (1 references)
 pkts bytes target     prot opt in     out     source               destination
    1   351 ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpt:bootpc
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere
    0     0 input_wan  all  --  any    any     anywhere             anywhere
    0     0 zone_wan_REJECT  all  --  any    any     anywhere             anywhere

Chain zone_wan_ACCEPT (3 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  any    eth0.2  anywhere             anywhere
    0     0 ACCEPT     all  --  eth0.2 any     anywhere             anywhere

Chain zone_wan_DROP (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  any    eth0.2  anywhere             anywhere
    0     0 DROP       all  --  eth0.2 any     anywhere             anywhere

Chain zone_wan_REJECT (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 reject     all  --  any    eth0.2  anywhere             anywhere
    0     0 reject     all  --  eth0.2 any     anywhere             anywhere

Chain zone_wan_forward (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     tcp  --  any    any     anywhere             192.168.1.xx     tcp dpt:7000
    0     0 forwarding_wan  all  --  any    any     anywhere             anywhere
    0     0 zone_wan_REJECT  all  --  any    any     anywhere             anywhere

dla pełnego obrazu jest jeszcze czesc dla Hotspot-a

config rule
        option _name 'Allow-DHCP-Renew-Hotspot'
        option src 'hotspot'
        option proto 'udp'
        option limit '10/sec'
        option src_port '67-68'
        option dest_port '67-68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option _name 'Allow-DNS-Request-Hotspot'
        option src 'hotspot'
        option dest_port '53'
        option limit '1000/sec'
        option target 'ACCEPT'
        option family 'ipv4'
        option proto 'tcpudp'

config zone
        option name 'hotspot'
        option network 'hotspot'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option log '1'

config forwarding
        option src 'hotspot'
        option dest 'wan'
        option family 'ipv4'
install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

4

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Ale tu nie masz tego 443...

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

5

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Ani jednego ani drugiego redirection dla 443, a działają obydwa. Sprawdzałem kilka razy.

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

6

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Dla działających połączeń tak będzie. Zrestaruj router, odłącz się od nie go i zobacz.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

7

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Takie coś robi skrypt dla tych ustawień:

. . .
Loading rules
iptables --table filter --insert zone_wan 1 --jump ACCEPT -p udp --dport 68
iptables --table filter --insert zone_hotspot 1 --jump ACCEPT -p udp --sport 67:68 --dport 67:68 -m limit --limit 10/sec
iptables --table filter --insert zone_hotspot 2 --jump ACCEPT -p tcp --dport 53 -m limit --limit 1000/sec
iptables --table filter --insert zone_hotspot 3 --jump ACCEPT -p udp --dport 53 -m limit --limit 1000/sec
iptables --table filter --insert zone_wan 2 --jump ACCEPT -p tcp
Loading redirects
iptables --table nat --insert zone_wan_prerouting 1 --jump DNAT -p tcp --dport 443 --to-destination 192.168.1.xx:7000
iptables --table filter --insert zone_wan_forward 1 --jump ACCEPT -d 192.168.1.xx/32 -p tcp --dport 7000
iptables --table nat --insert zone_lan_prerouting 1 --jump DNAT -d yy.yy.yy.yy/32 -p tcp --dport 443 --to-destination 192.168.1.xx:7000
iptables --table filter --insert zone_lan_forward 1 --jump ACCEPT -d 192.168.1.xx/32 -p tcp --dport 7000
Loading includes
. . .
install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

8

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Jak widzisz 80 nie ma tu za grosz. O ile domyślnych polityk nie zrobiłeś otwartych to nie ma.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

9 (edytowany przez Rafciq 2012-12-09 13:42:04)

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Po restarcie routera i kompa lokalny (drugi) redirect nadal działa.

config redirect
        option _name 'Redir-LAN-xx'
        option src 'lan'
        option src_dport '443'
        option src_dip 'yy.yy.yy.yy'
        option proto 'tcp'
        option dest_ip '192.168.1.xx'
        option dest_port '7000'
install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

10

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Domyślne są w pierwszym poście.

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

11

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Witam ponownie,
napisałem że otwierają się porty 80 i 443 bo takie zauważyłem, okazuje się że otwiera się wszystko:(
Jeżeli ktoś ma taką rolę lub chce mu się sprawdzić na AA 12.09 i przeskanuje porty będę wdzięczny za info.

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

12

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Przy domyślnej konfiguracji

# nmap -v 10.1.1.136 -p 1-1000

Starting Nmap 5.00 ( http://nmap.org ) at 2012-12-10 19:05 CET
NSE: Loaded 0 scripts for scanning.
Initiating ARP Ping Scan at 19:05
Scanning 10.1.1.136 [1 port]
Completed ARP Ping Scan at 19:05, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 19:05
Completed Parallel DNS resolution of 1 host. at 19:05, 0.01s elapsed
Initiating SYN Stealth Scan at 19:05
Scanning 10.1.1.136 [1000 ports]
Increasing send delay for 10.1.1.136 from 0 to 5 due to 23 out of 75 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 5 to 10 due to 22 out of 72 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 10 to 20 due to 11 out of 27 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 20 to 40 due to max_successful_tryno increase to 4
Completed SYN Stealth Scan at 19:06, 41.56s elapsed (1000 total ports)
Host 10.1.1.136 is up (0.00030s latency).
All 1000 scanned ports on 10.1.1.136 are closed
MAC Address: 64:70:02:BA:18:5C (Unknown)

Read data files from: /usr/share/nmap
Nmap done: 1 IP address (1 host up) scanned in 43.04 seconds
           Raw packets sent: 1236 (54.382KB) | Rcvd: 1005 (40.386KB)

Przy włączonym zdalnym dostępie (80 i 443)

 nmap -v 10.1.1.136 -p 1-1000

Starting Nmap 5.00 ( http://nmap.org ) at 2012-12-10 19:06 CET
NSE: Loaded 0 scripts for scanning.
Initiating ARP Ping Scan at 19:07
Scanning 10.1.1.136 [1 port]
Completed ARP Ping Scan at 19:07, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 19:07
Completed Parallel DNS resolution of 1 host. at 19:07, 0.02s elapsed
Initiating SYN Stealth Scan at 19:07
Scanning 10.1.1.136 [1000 ports]
Discovered open port 80/tcp on 10.1.1.136
Discovered open port 443/tcp on 10.1.1.136
Increasing send delay for 10.1.1.136 from 0 to 5 due to 22 out of 72 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 5 to 10 due to 92 out of 306 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 10 to 20 due to 11 out of 25 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 20 to 40 due to max_successful_tryno increase to 4
Completed SYN Stealth Scan at 19:07, 36.50s elapsed (1000 total ports)
Host 10.1.1.136 is up (0.00029s latency).
Interesting ports on 10.1.1.136:
Not shown: 998 closed ports
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https
MAC Address: 64:70:02:BA:18:5C (Unknown)

Read data files from: /usr/share/nmap
Nmap done: 1 IP address (1 host up) scanned in 37.99 seconds
           Raw packets sent: 1311 (57.682KB) | Rcvd: 1005 (40.394KB)

Przy włączonym zdalnym dostępie na https

Starting Nmap 5.00 ( http://nmap.org ) at 2012-12-10 19:08 CET
NSE: Loaded 0 scripts for scanning.
Initiating ARP Ping Scan at 19:08
Scanning 10.1.1.136 [1 port]
Completed ARP Ping Scan at 19:08, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 19:08
Completed Parallel DNS resolution of 1 host. at 19:08, 0.01s elapsed
Initiating SYN Stealth Scan at 19:08
Scanning 10.1.1.136 [1000 ports]
Discovered open port 443/tcp on 10.1.1.136
Increasing send delay for 10.1.1.136 from 0 to 5 due to 22 out of 72 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 5 to 10 due to 61 out of 203 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 10 to 20 due to 41 out of 135 dropped probes since last increase.
Increasing send delay for 10.1.1.136 from 20 to 40 due to max_successful_tryno increase to 4
Completed SYN Stealth Scan at 19:09, 38.12s elapsed (1000 total ports)
Host 10.1.1.136 is up (0.00029s latency).
Interesting ports on 10.1.1.136:
Not shown: 999 closed ports
PORT    STATE SERVICE
443/tcp open  https
MAC Address: 64:70:02:BA:18:5C (Unknown)

Read data files from: /usr/share/nmap
Nmap done: 1 IP address (1 host up) scanned in 39.59 seconds
           Raw packets sent: 1268 (55.790KB) | Rcvd: 1005 (40.390KB)

Skanowanie od strony wan jak by coś.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

13

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Dzięki. Wymiękam:(

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

14

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Witam ponownie. Mielę ten temat do kilku dni bez wyraźnego skutku.
Doszedłem do tego że gdy reguła ma jw. option src_dport ‘xxx’ to otwiera się dużo więcej portów niż tylko wskazany ‘xxx’. Oczywiście w tym przypadku zamiast, powinno być option dest_port.

Mam publiczne IP, próbuję od dłuższego czasu zrobić forwarding jw. portu 443 na port 7000 jednego z hostów w moim LAN-ie. Niby proste ale nie działa. Pod ręką mam tylko WDR4300 i najnowsze AA 12.09-rc1 od Cezarego.

Dodam że wewnętrzny forwarding działa, gdy dodałem regułę dla ICMP mogę sobie ping-ować do woli ale żaden forwarding z zewnątrz nie działa.

Robiłem forwarding z Backfire na innym sprzęcie i działało. Pomocy!

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

15

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Zrób forward przy pomocy iptables normalnie: iptables -t nat -I PREROUTING -i  eth0.2 -p tcp --dport 12345 -j DNAT --to-destination 192.168.1.100:12345   

Mi tam działa poprawnie i tak i przy pomocy UCI.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

16

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Niestety takie same efekty z iptables jak i konfiguracja z przez UCI. Każdy niby otwarty port jest widziany jako filtered. Dzisiaj będę testował na fabrycznym firmware.

Cezary czy Ty testowałeś na TL-WDR4300 z AA 12.09-rc1?

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

17

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Na 3600 dokładnie, choć sprzęt nie ma znaczenia w tym przypadku.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

18

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Cezary, forwarding działa poprawnie, ale nie w przypadku, jaki mam.

Mam w dwóch lokalizacjach A i B po jednym routerze R-A i R-B każdy z dostępem do Internetu. LAN-y obsługiwane przez RA- i R-B są w tej samej puli adresowej 192.168.1.0/24. Na obydwóch routerach działa N2N w taki sposób, że do brydża dopięty jest interfejs egde0. Uzyskałem w ten sposób jeden LAN, a urządzenia widzą się bez problemu niezależnie, w której lokalizacji są. DHCP w R-A ma inny zakres niż DHCP w R-B i obydwa nie rozgłaszają po interfejsach edge0. Ogólnie mówiąc wewnątrz LAN-ów wszystko działa jak należy.

Problem polega na tym że R-A ma publiczny IP  i na nim mogę zrobić forwarding, a R-B niema publicznego IP. Natomiast do R-B podpięty jest host, do którego chcę się dostać z zewnątrz.

Forwarding działa poprawnie dopóki przekierowuję porty do hostów dopiętych do R-A, nie działa natomiast gdy robię to do hostów wpiętych do R-B.

Czy masz jakiś pomysł?

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub

19

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Po co w tym przypadku forwarding? Jeżeli masz edge złączone z lanem, to ustaw po prostu routing, żeby na R-A podsieci z dhcp R-B szło przed edge  i analogicznie na R-B.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

20 (edytowany przez Rafciq 2012-12-23 21:53:23)

Odp: Problem z Firewall-em TL-WDR4300 AA 12.09-rc1

Chcę się dostać do hosta podpiętego, do R-B z zewnątrz wchodząc przez R-A. Między LAN-ami działa mi wszystko tak jak trzeba.

Może tak będzie jaśniej:

  • Router R-A
    WAN: (eth1) Internet z IP publicznym 12.34.56.78
    LAN: Bride (wlan0 + eth0 + edge0)
    Redirect 100 -> 192.168.1.10:80
    Redirect 101 -> 192.168.1.20:80

  • Router R-B
    WAN: (eth1) Internet z IP prywatnym
    LAN: Bride (wlan0 + eth0 + edge0)

Gdzie edge0 z R-A i R-B tworzą pomost, czyli LAN R-A = LAN R-B.

  • Komputer K-A
    LAN: 192.168.1.10 wpięty do R-A
    serwer WWW port 80

  • Komputer K-B
    LAN: 192.168.1.20 wpięty do R-BA
    serwer WWW port 80

  1. Z K-A ping do K-B – OK.

  2. Z K-B ping do K-A – OK.

  3. Z K-A próba otwarcia portu 80 na K-B – OK.

  4. Z K-B próba otwarcia portu 80 na K-A – OK.

  5. Z Internetu próba otwarcia portu 100 na 12.34.56.78 – OK.

  6. Z Internetu próba otwarcia portu 101 na 12.34.56.78 – TIMEOUT (nmap – port filtered).

install.sh - Aktualizacja systemu, sysinfo.sh - Info.o systemie, openvpn-auth.sh - Login dla OpenVPN
Tu moje skrypty na GitHub