Nachalo Vhod/Registratsiia Pomosht Originala na tazi stranica
Oblasti
 Novini
 Aktualna tema
 Linux portali
 Kakvo e Linuks?
 Vuprosi-otgovori
 Forumi
   •Trudova borsa
   •Konkurs
 Statii
 Distributsii
   •Poruchka na CD
 Made In BG
 Failove
 Vruzki
 Galeriia
 Konferentsii
Nastroiki
 Vunshen vid
 Predlozheniia
 Napravi si sam
I oshte ...
 Za nas
 Linuks za bulgari EOOD
 Link kum nas
 Predlozheniia

Podkrepiano ot:
TelePoint - Miasto za hora sus svobodni idei

SiteGround

initLab

Adsys Group

SAP Bulgaria

Vuprosi otgovori
Vupros: remote desktop kum komp. zad Linux
[Tursi: ]

VNIMANIE: Izpolzvaite forumite na saita za da zadadete vashite vuprosi.

Kum nachaloto |Dobavi vupros |Otgovori
 
Vupros
Ot: boyanov (racing __@__ data< dot >bg) Data: 04/23/2007
 Imam Debian Router/Firewall i zad nego Windows... Na rutura
 si generirah edin firewall script s pomoshtta na tazi
programa: http://easyfwgen.morizot.net/gen
 Predi da si slozha tozi skript si biah prenasochil Remote
 Desktop (TCP / port 3389) kum vutreshnata mrezha i se svurzvah
 s Windows-a bez problem! Sega obache ne moga... Dosta neshta
 promeniah po skripta, testvah, no ne moga da se svurzha,
vupreki che slednite 2 reda sa v nego...

 $IPT -A FORWARD -p tcp -i $INET_IFACE --destination-port
3389 --destination 192.168.0.2 -j ACCEPT
 $IPT -t nat -A PREROUTING -p tcp -i $INET_IFACE
 --destination-port 3389 -j DNAT --to-destination
192.168.0.2:3389

Peistvam i rezultata ot "iptables --list"
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
bad_packets  all  --  anywhere             anywhere
 DROP       all  --  anywhere            
ALL-SYSTEMS.MCAST.NET
ACCEPT     all  --  192.168.0.0/24       anywhere
ACCEPT     all  --  anywhere             192.168.0.255
 ACCEPT     all  --  anywhere             anywhere           
state RELATED,ESTABLISHED
tcp_inbound  tcp  --  anywhere             anywhere
udp_inbound  udp  --  anywhere             anywhere
icmp_packets  icmp --  anywhere             anywhere
 DROP       all  --  anywhere             anywhere           
PKTTYPE = broadcast
 LOG        all  --  anywhere             anywhere           
 limit: avg 3/min burst 3 LOG level warning prefix `INPUT
packet died: '

Chain FORWARD (policy DROP)
target     prot opt source               destination
bad_packets  all  --  anywhere             anywhere
tcp_outbound  tcp  --  anywhere             anywhere
udp_outbound  udp  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
 ACCEPT     all  --  anywhere             anywhere           
state RELATED,ESTABLISHED
 ACCEPT     tcp  --  anywhere             192.168.0.2        
tcp dpt:3389
 LOG        all  --  anywhere             anywhere           
 limit: avg 3/min burst 3 LOG level warning prefix `FORWARD
packet died: '

Chain OUTPUT (policy DROP)
target     prot opt source               destination
 DROP       icmp --  anywhere             anywhere           
state INVALID
ACCEPT     all  --  localhost.localdomain  anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  192.168.0.1          anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
 LOG        all  --  anywhere             anywhere           
 limit: avg 3/min burst 3 LOG level warning prefix `OUTPUT
packet died: '

Chain bad_packets (2 references)
target     prot opt source               destination
 LOG        all  --  192.168.0.0/24       anywhere           
LOG level warning prefix `Illegal source: '
DROP       all  --  192.168.0.0/24       anywhere
 LOG        all  --  anywhere             anywhere           
state INVALID LOG level warning prefix `Invalid packet: '
 DROP       all  --  anywhere             anywhere           
state INVALID
bad_tcp_packets  tcp  --  anywhere             anywhere
RETURN     all  --  anywhere             anywhere

Chain bad_tcp_packets (1 references)
target     prot opt source               destination
RETURN     tcp  --  anywhere             anywhere
 LOG        tcp  --  anywhere             anywhere           
 tcp flags:!SYN,RST,ACK/SYN state NEW LOG level warning
prefix `New not syn: '
 DROP       tcp  --  anywhere             anywhere           
tcp flags:!SYN,RST,ACK/SYN state NEW
 LOG        tcp  --  anywhere             anywhere           
 tcp flags:FIN,SYN,RST,PSH,ACK,URG/NONE LOG level warning
prefix `Stealth scan: '
 DROP       tcp  --  anywhere             anywhere           
tcp flags:FIN,SYN,RST,PSH,ACK,URG/NONE
 LOG        tcp  --  anywhere             anywhere           
 tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,SYN,RST,PSH,ACK,URG
LOG level warning prefix `Stealth scan: '
 DROP       tcp  --  anywhere             anywhere           
tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,SYN,RST,PSH,ACK,URG
 LOG        tcp  --  anywhere             anywhere           
 tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,PSH,URG LOG level
warning prefix `Stealth scan: '
 DROP       tcp  --  anywhere             anywhere           
tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,PSH,URG
 LOG        tcp  --  anywhere             anywhere           
 tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,SYN,RST,ACK,URG LOG
level warning prefix `Stealth scan: '
 DROP       tcp  --  anywhere             anywhere           
tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,SYN,RST,ACK,URG
 LOG        tcp  --  anywhere             anywhere           
 tcp flags:SYN,RST/SYN,RST LOG level warning prefix `Stealth
scan: '
 DROP       tcp  --  anywhere             anywhere           
tcp flags:SYN,RST/SYN,RST
 LOG        tcp  --  anywhere             anywhere           
 tcp flags:FIN,SYN/FIN,SYN LOG level warning prefix `Stealth
scan: '
 DROP       tcp  --  anywhere             anywhere           
tcp flags:FIN,SYN/FIN,SYN
RETURN     tcp  --  anywhere             anywhere

Chain icmp_packets (1 references)
target     prot opt source               destination
 LOG        icmp -f  anywhere             anywhere           
LOG level warning prefix `ICMP Fragment: '
DROP       icmp -f  anywhere             anywhere
 DROP       icmp --  anywhere             anywhere           
icmp echo-request
 ACCEPT     icmp --  anywhere             anywhere           
icmp time-exceeded
RETURN     icmp --  anywhere             anywhere

Chain tcp_inbound (1 references)
target     prot opt source               destination
 REJECT     tcp  --  anywhere             anywhere           
tcp dpt:auth reject-with icmp-port-unreachable
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:www
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:https
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:ftp
 ACCEPT     tcp  --  anywhere             anywhere           
tcp spt:ftp-data
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpts:62000:64000
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:smtp
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:pop3
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:imap2
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:pop3s
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:imaps
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpt:ssh
 ACCEPT     tcp  --  anywhere             anywhere           
tcp dpts:5000:5100
RETURN     tcp  --  anywhere             anywhere

Chain tcp_outbound (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere

Chain udp_inbound (1 references)
target     prot opt source               destination
 DROP       udp  --  anywhere             anywhere           
udp dpt:netbios-ns
 DROP       udp  --  anywhere             anywhere           
udp dpt:netbios-dgm
 REJECT     udp  --  anywhere             anywhere           
udp dpt:113 reject-with icmp-port-unreachable
 ACCEPT     udp  --  anywhere             anywhere           
udp dpt:ntp
 ACCEPT     udp  --  anywhere             anywhere           
udp dpt:domain
RETURN     udp  --  anywhere             anywhere

Chain udp_outbound (1 references)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere

 Dano niakoi uspee da otkrie greshkata... blagodaria
predvaritelno!



Otgovor #1
Ot: plamen Data: 04/24/2007
 Vuv FORWARD, kato priemash paketi kum destinatsiia
 192.168.0.2:3389, demek ot vun kum bozata, triabva da ima i
 obratna vruzka, sled kato politikata ti e DROP, t.e. ot sors
192.168.0.2:3389 kum vsiakude, a SNAT-a prez $INET_IFACE ?!



Otgovor #2
Ot: boyanov (racing__at__data__dot__bg) Data: 04/24/2007
 bi li mi pomognal za SNAT-a zashtoto s tova koeto probvah ne
 se poluchava... znachi osven posochenite v nachaloto 2 reda
 (DNAT-a) dobavih slednite 2 pravila za obratnata psoka, no
iavno burkam neshto...

 $IPT -A FORWARD -p tcp -o ppp0 --source-port 3389 --source
192.168.0.2 -j ACCEPT

 $IPT -t nat -A POSTROUTING -p tcp -o ppp0 -s 192.168.0.2
--source-port 3389 -j SNAT --to-source ............

ne znam obache kakvo da napisha na miastoto na "--to-source"
 kakvo imash predvid s "kum vsiakade" ili po-tochno znam kakvo
znachi no kak da go opisha?

INet <==> |ppp0 LinuxFirewall eth1| <==> Windows

IP na Windows-a: 192.168.0.2
$INET_IFACE=ppp0



Otgovor #3
Ot: boyanov (racing__at__data[ tochka ]bg) Data: 04/24/2007
vsushtnost SNAT-a sum go napravil taka:
 $IPT -t nat -A POSTROUTING -o $INET_IFACE -j SNAT
--to-source $INET_ADDRESS

No pak ne moga da se svurzha...



Otgovor #4
Ot: ll.. Data: 04/24/2007
Pri men taka raboti bez problem:
 iptables -A PREROUTING -t nat -i eth0 -p tcp -s
 89.25.117.63/32 --dport 3389 -j DNAT --to-destination
192.168.0.32:3389




<< tar (1 ) | pomognete mi (3 ) >>

 
© 2011-... Asotsiatsiia "Linuks za bulgari"
© 2007-2010 Linuks za bulgari EOOD
© 1999-2006 Slavej Karadjov
Ako iskate da prepechatate ili tsitirate informatsiia ot tozi sait prochetete purvo tova
Vunshniia vid e napraven ot MOMCHE
Code Version: 1.0.8 H (Revision: 23-09-2011)
 
Изпълнението отне: 0 wallclock secs ( 0.08 usr + 0.00 sys = 0.08 CPU)