Temat: router 4300 Gagroyle - nie mogę otworzyć portu 80

zakupiłem nowe urzadznie, 4300, wgrałem najnowsze Gagroyle PL, poustawiałem to co miałem na routerze 1043, działa to co ma działać oprócz jednej rzeczy, tj. nie moge otworzyć portu 80 od strony WAN, " niby jest otwarty " przez gui a raczej przekierowany z 80 na 80, tak miałem poprzednio ustawione i funkcjonowało, tj. strona www. Czy coś się zmieniło w firewall-u ?

2

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

W gui masz zaznaczyć "zdalny dostęp" i to wszystko. Nic ręcznie nie robisz dodatkowo, żadnego przekierowania itd. I tak, działa to.

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

3

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

oj, źle opisałem, zbyt szybko
gui gargoyle mam przekierowane na port 443 tylko i wyłącznie,
natomiast mam założoną strone www na porcie 80 tj. httpd_gargoyle. Lokalnie httpd_gargoyle działa na 80 porcie. Na poprzednim routerze 1043, aby sobie z tym poradzić po prostu przekierowałem port 80 z WAN do LAN też na 80 na ip routera tj. 192.168.106.1 i to funkcjonowało, ale na tym routerze z najnowszym softem to juz nie funkcjonuje.
Porównywałem wpisy w firewallu, teoretycznie wpisy są:
oto wyniki poleceń sprawdzjących:

root@Gargoyle:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      1508 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    4 root         0 SW   [kworker/0:0]
    5 root         0 SW   [kworker/u:0]
    6 root         0 SW<  [khelper]
    7 root         0 SW   [kworker/u:1]
   67 root         0 SW   [sync_supers]
   69 root         0 SW   [bdi-default]
   71 root         0 SW<  [kblockd]
  102 root         0 SW   [kswapd0]
  150 root         0 SW   [fsnotify_mark]
  180 root         0 SW<  [ath79-spi]
  191 root         0 SW   [mtdblock0]
  196 root         0 SW   [mtdblock1]
  201 root         0 SW   [mtdblock2]
  206 root         0 SW   [mtdblock3]
  211 root         0 SW   [mtdblock4]
  216 root         0 SW   [mtdblock5]
  284 root         0 SW   [kworker/0:1]
  450 root         0 SW   [kworker/0:2]
  491 root         0 SWN  [jffs2_gcd_mtd3]
  493 root         0 SW   [flush-mtd-unmap]
  516 root         0 SW   [khubd]
  525 root         0 SW   [scsi_eh_0]
  526 root         0 SW   [usb-storage]
  527 root         0 SW   [kworker/u:2]
  528 root         0 SW   [kworker/0:3]
  551 root      1508 S    init
  580 root         0 SW<  [cfg80211]
  618 root         0 SW<  [rpciod]
  631 root         0 SW<  [nfsiod]
  785 root      1512 S    /sbin/syslogd -C16
  787 root      1496 S    /sbin/klogd
  789 root       876 S    /sbin/hotplug2 --override --persistent --set-rules-file /etc/hotplug2.rules --set-coldplug-cmd /sbin/udevtrigger --max-children 1
  799 root       876 S    /sbin/ubusd
  898 nobody    1024 S    /usr/sbin/portmap
  924 root      1476 S    /sbin/netifd
  972 root      1512 S    udhcpc -p /var/run/udhcpc-eth0.2.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth0.2
1208 root      1596 S    hostapd -P /var/run/wifi-phy0.pid -B /var/run/hostapd-phy0.conf
1353 root      1596 S    hostapd -P /var/run/wifi-phy1.pid -B /var/run/hostapd-phy1.conf
1631 root      1152 S    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
1662 root      1344 S    httpd_gargoyle -c cgi-bin/**|**.sh|**.cgi|**.csv -d /www -u root -p 443 -S -E /etc/httpd_gargoyle.pem -i /var/run/httpd_gargoyle-
1806 root      1392 S    httpd_gargoyle -c cgi-bin/**|**.sh|**.cgi|**.csv -d /www -u root -p 443 -S -E /etc/httpd_gargoyle.pem -i /var/run/httpd_gargoyle-
1932 root         0 SW   [flush-8:0]
2100 nobody     956 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf
2147 root      1068 S    /usr/sbin/rpc.statd -p 32778 -o 32779
2170 root         0 SW   [lockd]
2171 root         0 SW   [nfsd]
2172 root         0 SW   [nfsd]
2173 root         0 SW   [nfsd]
2174 root         0 SW   [nfsd]
2175 root         0 SW   [nfsd]
2176 root         0 SW   [nfsd]
2177 root         0 SW   [nfsd]
2178 root         0 SW   [nfsd]
2180 root      1400 S    /usr/sbin/rpc.mountd -p 32780 -F
2252 root      3108 S    /usr/sbin/smbd -D
2254 root      3196 S    /usr/sbin/nmbd -D
2333 root      1384 S    /usr/bin/ddns_gargoyle -P /etc/ddns_providers.conf -C /etc/ddns_gargoyle.conf -d
2628 root      1536 S    {hotplug-call} /bin/sh /sbin/hotplug-call iface
2833 root      1504 S    /usr/sbin/ntpd -n -p 0.pool.ntp.org -p 1.pool.ntp.org -p 2.pool.ntp.org -p 3.pool.ntp.org
2975 root      1020 S    /usr/sbin/vsftpd /tmp/vsftpd/vsftpd.conf
2987 nobody    1344 S    httpd_gargoyle -p 80 -d /tmp/usb_mount/C264-7FE6/Dane/www
3003 root      1504 S    /sbin/watchdog -t 5 /dev/watchdog
3334 root      1216 R    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
3386 root      1508 S    -ash
3901 root      1508 S    /usr/sbin/crond -c /etc/crontabs -l 9
3903 root      1536 S    {hotplug-call} /bin/sh /sbin/hotplug-call iface
3905 root      1308 S    /usr/bin/ddns_gargoyle -P /etc/ddns_providers.conf -C /etc/ddns_gargoyle.conf
3906 root      1500 R    ps

netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:nfs             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:32777           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:32778           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:netbios-ssn     0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:32780           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:sunrpc          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:www             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:ftp             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:domain          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:https           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:microsoft-ds    0.0.0.0:*               LISTEN
tcp        0   7596 Gargoyle:https          192.168.106.128:54985   FIN_WAIT1
tcp        0    268 Gargoyle:ssh            Wieslaw_15.lan:55065    ESTABLISHED
tcp        0      0 localhost:893           localhost:sunrpc        ESTABLISHED
tcp        0      0 localhost:sunrpc        localhost:893           ESTABLISHED
tcp        0      0 Gargoyle:microsoft-ds   Wieslaw_15.lan:55067    ESTABLISHED
netstat: /proc/net/tcp6: No such file or directory
udp        0      0 0.0.0.0:nfs             0.0.0.0:*
udp        0      0 0.0.0.0:32777           0.0.0.0:*
udp        0      0 0.0.0.0:32778           0.0.0.0:*
udp        0      0 0.0.0.0:32780           0.0.0.0:*
udp        0      0 0.0.0.0:domain          0.0.0.0:*
udp        0      0 0.0.0.0:bootps          0.0.0.0:*
udp        0      0 0.0.0.0:sunrpc          0.0.0.0:*
udp        0      0 localhost:627           0.0.0.0:*
udp        0      0 192.168.106.255:netbios-ns 0.0.0.0:*
udp        0      0 Gargoyle:netbios-ns     0.0.0.0:*
udp        0      0 0.0.0.0:netbios-ns      0.0.0.0:*
udp        0      0 192.168.106.255:netbios-dgm 0.0.0.0:*
udp        0      0 Gargoyle:netbios-dgm    0.0.0.0:*
udp        0      0 0.0.0.0:netbios-dgm     0.0.0.0:*
netstat: /proc/net/udp6: No such file or directory
netstat: /proc/net/raw6: No such file or directory
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     STREAM     LISTENING       3584 /var/nmbd/unexpected
unix  2      [ ]         DGRAM                      2070 /var/run/hostapd-phy0/wlan0
unix  2      [ ACC ]     STREAM     LISTENING       1365 /var/run/ubus.sock
unix  13     [ ]         DGRAM                      1122 /dev/log
unix  2      [ ]         DGRAM                      2280 /var/run/hostapd-phy1/wlan1
unix  2      [ ]         DGRAM                      4486
unix  2      [ ]         DGRAM                      3748
unix  2      [ ]         DGRAM                      3378
unix  2      [ ]         DGRAM                      3281
unix  2      [ ]         DGRAM                      3137
unix  2      [ ]         DGRAM                      2839
unix  2      [ ]         DGRAM                      2650
unix  2      [ ]         DGRAM                      2624
unix  2      [ ]         DGRAM                      1658
unix  2      [ ]         DGRAM                      1649
unix  3      [ ]         STREAM     CONNECTED       1647 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       1646
unix  2      [ ]         DGRAM                      1638
unix  2      [ ]         DGRAM                      1588

netstat -atp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:nfs             0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:32777           0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:32778           0.0.0.0:*               LISTEN      2147/rpc.statd
tcp        0      0 0.0.0.0:netbios-ssn     0.0.0.0:*               LISTEN      2252/smbd
tcp        0      0 0.0.0.0:32780           0.0.0.0:*               LISTEN      2180/rpc.mountd
tcp        0      0 0.0.0.0:sunrpc          0.0.0.0:*               LISTEN      898/portmap
tcp        0      0 0.0.0.0:www             0.0.0.0:*               LISTEN      2987/httpd_gargoyle
tcp        0      0 0.0.0.0:ftp             0.0.0.0:*               LISTEN      2975/vsftpd
tcp        0      0 0.0.0.0:domain          0.0.0.0:*               LISTEN      2100/dnsmasq
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      1631/dropbear
tcp        0      0 0.0.0.0:https           0.0.0.0:*               LISTEN      1662/httpd_gargoyle
tcp        0      0 0.0.0.0:microsoft-ds    0.0.0.0:*               LISTEN      2252/smbd
tcp        0   7596 Gargoyle:https          192.168.106.128:54985   FIN_WAIT1   1806/httpd_gargoyle
tcp        0    300 Gargoyle:ssh            Wieslaw_15.lan:55065    ESTABLISHED 3334/dropbear
tcp        0      0 localhost:893           localhost:sunrpc        ESTABLISHED -
tcp        0      0 localhost:sunrpc        localhost:893           ESTABLISHED 898/portmap
netstat: /proc/net/tcp6: No such file or directory

4

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

Teraz tak nie działa. Otwórz port 80 normalnie jak się to robi: http://eko.one.pl/?p=openwrt-konfigurac … estronywan

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

5

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

Zgadza się nie działa to w ten sposób teraz. Ja jestem w trakcie tworzenia dodatkowego menu do GUI aby otwierało porty bez konieczności używania konsoli.

6

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

co robię nie tak ? po wpisaniu

root@Gargoyle:/etc/config# uci add firewall rule
cfg2092bd

7

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

a tak wygląda ustawienie portu 80 obecnie


config redirect 'redirect_enabled_number_0'
        option name 'www'
        option src 'wan'
        option dest 'lan'
        option proto 'tcp'
        option src_dport '80'
        option dest_ip '192.168.106.1'
        option dest_port '80'

config redirect 'redirect_enabled_number_1'
        option name 'www'
        option src 'wan'
        option dest 'lan'
        option proto 'udp'
        option src_dport '80'
        option dest_ip '192.168.106.1'
        option dest_port '80'

8

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

wiesmac napisał/a:

co robię nie tak ? po wpisaniu

root@Gargoyle:/etc/config# uci add firewall rule
cfg2092bd

Nic źle nie robisz. Pisz dalej.

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

9

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

czy to możliwe że po wpisaniu poniższych linijek, straciłem internet ?
    # uci add firewall rule
    # uci set firewall.@rule[-1].name=www
    # 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

jak przywrócić stary plik, edytować go - , czy pousuwać wpisy

wynik polecenia
root@Gargoyle:~# cat /etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

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

config zone
        option name 'wan'
        list network 'wan'
        list network 'wan6'
        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 rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option src_ip 'fe80::/10'
        option src_port '547'
        option dest_ip 'fe80::/10'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

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

config include
        option path '/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall                                                                             '

config include 'miniupnpd'
        option type 'script'
        option path '/usr/share/miniupnpd/firewall.include'
        option family 'IPv4'
        option reload '1'

config include 'openvpn_include_file'
        option path '/etc/openvpn.firewall'

config remote_accept 'wan_ftp_server_command'
        option proto 'tcp'
        option zone 'wan'
        option local_port '21'
        option remote_port '21'

config remote_accept 'ra_443_443'
        option local_port '443'
        option remote_port '443'
        option proto 'tcp'
        option zone 'wan'

config remote_accept 'ra_22_22'
        option local_port '22'
        option remote_port '22'
        option proto 'tcp'
        option zone 'wan'

config rule

config rule

config rule

10

Odp: router 4300 Gagroyle - nie mogę otworzyć portu 80

Nie, to otwiera port i nic więcej. Te trzy rule są niepotrzebne.  ' Ci został w środku. zrób uci show firewall i dopóki nie wyświetli poprawnie to masz błędy składniowe w skrypcie. uci używaj skoro masz problemy z edytorem...

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