tak?
exit 0
T="ssh -f -NT -R port:localhost:port login@server -i /root/rsa_secret
pgrep -f "$T" > /dev/null 2>&1 || $T
Nie jesteś zalogowany. Proszę się zalogować lub zarejestrować.
eko.one.pl → Posty przez kostek136
tak?
exit 0
T="ssh -f -NT -R port:localhost:port login@server -i /root/rsa_secret
pgrep -f "$T" > /dev/null 2>&1 || $T
to znaczy to tak?
#!/bin/sh
T="ssh -f -NT -R 1234:localhost:22 użytkownik@adres_serwera -i /root/rsa_secret.txt"
pgrep -f "$T" > /dev/null 2>&1 || $T
vi /etc/rc.local
co mam tam wpisać żeby przy restarcie tp-linka wznowiło tunel
No to inaczej zapytam
pod jaką nazwą w eko.one.pl znajdę rozwiązanie mojego problemu ?
vi /etc/rc.local pewnie tak ![]()
i to wpisać tak?
ssh -f -NT -R port:localhost:port login@server-i /root/rsa_secret.txt
a jak tego dokonać ?
A jak wywołać ten folder etc/rc.local ?
i wpisać w niego to co podąłem w pierwszym poście czy to poniżej ?
ssh -f -NT -R port:localhost:port login@server-i /root/rsa_secret.txt
lub pod jaką nazwą mam szukać odpowiedzi w Witryna eko.one.pl
pierwsze pytanie, czy dane wklepać z # czy bez?
#!/bin/sh
T="ssh -f -NT -R 1234:localhost:22 użytkownik@adres_serwera -i /root/rsa_secret.txt"
pgrep -f "$T" > /dev/null 2>&1 || $T
drugie pytanie, co trzeba zrobić żeby przy restarcie routera wznawiało tunel ?
ja mam taki i nie narzekam
udało mi się opanować, zrobiłem firstboot i wszystko od nowa zrobiłem, i za pierwszym szczałem zadziałało.
Dzięki Cezary za kolejną pomoc.
oznacza tylko tyle że... albo się od strony wanu nie odwołałeś
a w jaki sposób się to odwołuje ?
operator to telewizja kablowa.
Raczej nie blokują bo na starym sofcie działa tak jak powinno.
root@Gargoyle:~# iptables -v -L | grep 8080
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:8080
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:8080
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:8080
0 0 ACCEPT tcp -- any any anywhere Gargoyle tcp dpt:8080
0 0 ACCEPT udp -- any any anywhere Gargoyle udp dpt:8080
0 0 zone_lan_dest_ACCEPT tcp -- any any 192.168.1.0/24 Gargoyle tcp dpt:8080 /* jjj (reflection) */
0 0 zone_lan_dest_ACCEPT udp -- any any 192.168.1.0/24 Gargoyle udp dpt:8080 /* jjj (reflection) */
0 0 ACCEPT tcp -- any any anywhere Gargoyle tcp dpt:8080 /* jjj */
0 0 ACCEPT udp -- any any anywhere Gargoyle udp dpt:8080 /* jjj */
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:8080 /* ssh */
root@Gargoyle:~#
tak
nie pomogło, brak połączenia
po instalacji zrobiłem reset routera
# 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=8080
# uci commit firewall
tu zmienić na 8080 tak?
czy pozostawić 22 ?
sorry za głupawe pytanie ale wolę się upewnić
uci set firewall.@rule[-1].dest_port=22
Firewall/Przekierowanie portów/Przekierowanie portu z WAN do LAN: 192.168.1.1 8080
tak odblokowałem, i nic
Witam przy starym sofcie dało się połączyć do kamery ze zewnątrz, a teraz jedynie działa po lanie kamerka.
http://192.168.1.1:8080/?action=stream tak działa w lan
http:// mojeip :8080/?action=stream tak nie działa. jakiś pomysł ?
tak zresetowałem
dobra na razie poddaję się w tym temacie.
znalazłem fajna stronę, może komuś się przyda ![]()
http://www.gargoyle-router.com/download.php
są tu wszystkie softy
dzięki Cezary za chwilę uwagi, ale jestem na tyle laikiem że łatwiej zainstalować starszy soft.
nie wiem czy o to chodzi,
root@Gargoyle:~# iptables -v -L INPUT
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
135 8456 bw_ingress all -- eth1 any anywhere anywhere
667 64926 delegate_input all -- any any anywhere anywhere
root@Gargoyle:~#
sory 22 192.168.2.1 22 i nadal wyskakuje błąd
jedynie tak 22 192.168.21.16 22
ale to też nic nie dało, brak połączenia.
Cezary a czy jest jakieś archiwum starych softów gdzieś do ściągnięcia ?
jedynie da się tak ustawić
2222 192.168.21.16 22
nie, zaraz to zrobię
Port Range Forwarding
niestety ale w Cisco nie da się przekserować portu na 192.168.2.1
wyskakuje informacja Invalid IP address:192.168.2.1!
jeśli zrobię tunel ssh to Idzi się połączyć, lecz przez dyndns lub noip nie ma szans
root@Gargoyle:~# uci show firewall
firewall.@defaults[0]=defaults
firewall.@defaults[0].syn_flood=1
firewall.@defaults[0].input=ACCEPT
firewall.@defaults[0].output=ACCEPT
firewall.@defaults[0].forward=REJECT
firewall.@zone[0]=zone
firewall.@zone[0].name=lan
firewall.@zone[0].network=lan
firewall.@zone[0].input=ACCEPT
firewall.@zone[0].output=ACCEPT
firewall.@zone[0].forward=REJECT
firewall.@zone[1]=zone
firewall.@zone[1].name=wan
firewall.@zone[1].network=wan wan6
firewall.@zone[1].input=REJECT
firewall.@zone[1].output=ACCEPT
firewall.@zone[1].forward=REJECT
firewall.@zone[1].masq=1
firewall.@zone[1].mtu_fix=1
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].src=lan
firewall.@forwarding[0].dest=wan
firewall.@rule[0]=rule
firewall.@rule[0].name=Allow-DHCP-Renew
firewall.@rule[0].src=wan
firewall.@rule[0].proto=udp
firewall.@rule[0].dest_port=68
firewall.@rule[0].target=ACCEPT
firewall.@rule[0].family=ipv4
firewall.@rule[1]=rule
firewall.@rule[1].name=Allow-Ping
firewall.@rule[1].src=wan
firewall.@rule[1].proto=icmp
firewall.@rule[1].icmp_type=echo-request
firewall.@rule[1].family=ipv4
firewall.@rule[1].target=ACCEPT
firewall.@rule[2]=rule
firewall.@rule[2].name=Allow-DHCPv6
firewall.@rule[2].src=wan
firewall.@rule[2].proto=udp
firewall.@rule[2].src_ip=fe80::/10
firewall.@rule[2].src_port=547
firewall.@rule[2].dest_ip=fe80::/10
firewall.@rule[2].dest_port=546
firewall.@rule[2].family=ipv6
firewall.@rule[2].target=ACCEPT
firewall.@rule[3]=rule
firewall.@rule[3].name=Allow-ICMPv6-Input
firewall.@rule[3].src=wan
firewall.@rule[3].proto=icmp
firewall.@rule[3].icmp_type=echo-request echo-reply destination-unreachable packet-too-big time-exceeded bad-header unknown-header-type router-solicitation neighbour-solicitation router-advertisement neighbour-advertisement
firewall.@rule[3].limit=1000/sec
firewall.@rule[3].family=ipv6
firewall.@rule[3].target=ACCEPT
firewall.@rule[4]=rule
firewall.@rule[4].name=Allow-ICMPv6-Forward
firewall.@rule[4].src=wan
firewall.@rule[4].dest=*
firewall.@rule[4].proto=icmp
firewall.@rule[4].icmp_type=echo-request echo-reply destination-unreachable packet-too-big time-exceeded bad-header unknown-header-type
firewall.@rule[4].limit=1000/sec
firewall.@rule[4].family=ipv6
firewall.@rule[4].target=ACCEPT
firewall.@include[0]=include
firewall.@include[0].path=/etc/firewall.user
firewall.@include[1]=include
firewall.@include[1].type=script
firewall.@include[1].path=/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall
firewall.@include[1].family=IPv4
firewall.@include[1].reload=1
firewall.miniupnpd=include
firewall.miniupnpd.type=script
firewall.miniupnpd.path=/usr/share/miniupnpd/firewall.include
firewall.miniupnpd.family=IPv4
firewall.miniupnpd.reload=1
firewall.openvpn_include_file=include
firewall.openvpn_include_file.path=/etc/openvpn.firewall
firewall.redirect_enabled_number_0=redirect
firewall.redirect_enabled_number_0.name=dhdhd
firewall.redirect_enabled_number_0.src=wan
firewall.redirect_enabled_number_0.dest=lan
firewall.redirect_enabled_number_0.proto=tcp
firewall.redirect_enabled_number_0.src_dport=7777
firewall.redirect_enabled_number_0.dest_ip=192.168.2.1
firewall.redirect_enabled_number_0.dest_port=7777
firewall.redirect_enabled_number_1=redirect
firewall.redirect_enabled_number_1.name=dhdhd
firewall.redirect_enabled_number_1.src=wan
firewall.redirect_enabled_number_1.dest=lan
firewall.redirect_enabled_number_1.proto=udp
firewall.redirect_enabled_number_1.src_dport=7777
firewall.redirect_enabled_number_1.dest_ip=192.168.2.1
firewall.redirect_enabled_number_1.dest_port=7777
firewall.@redirect[0]=redirect
firewall.@redirect[0].name=torrenty
firewall.@redirect[0].src=wan
firewall.@redirect[0].proto=tcpudp
firewall.@redirect[0].src_dport=7777
firewall.@redirect[0].dest_port=7777
firewall.@redirect[0].dest_ip=192.168.2.1
firewall.@rule[5]=rule
firewall.@rule[5].name=ssh
firewall.@rule[5].src=wan
firewall.@rule[5].target=ACCEPT
firewall.@rule[5].proto=tcp
firewall.@rule[5].dest_port=22
root@Gargoyle:~#
aha dodam że po zresetowaniu ustawień nawet nie można połączyć się w lokali 192.168.21.16 7777
# 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=22
# uci commit firewall
nic to nie dało ![]()
eko.one.pl → Posty przez kostek136
Forum oparte o PunBB, wspierane przez Informer Technologies, Inc