Article View: alt.pl.comp.os.linux.debian
Article #29544Debian gateway - problem z przekierowaniem
From: Obserwator
Date: Sun, 06 Apr 2008 11:06
Date: Sun, 06 Apr 2008 11:06
44 lines
2740 bytes
2740 bytes
Witam serdecznie! Mam u siebie dwa komputery: pierwszy robi za router na ktorym stoi Debian i udostepnia polaczenie z internetem drugiemu kompowi z Windowsem XP. Na drugim komputerze postawilem serwer FTP przez program Bullet FTP Server (192.168.1.2). Chcialbym z zewnatrz moc dostac sie na ten serwer za posrednictwem Debiana wpisujac IP zewnetrzne login i haselko. Zrobilem przekierowanie portu ale nie chce dzialac jak trzeba. Oto budowa Firewalla: iptables -F iptables -X iptables -t nat -X iptables -t nat -F iptables -A INPUT -i lo -j ACCEPT iptables -A FORWARD -o lo -j ACCEPT iptables -A INPUT -s 0/0 -d ip.ip.ip -p tcp --dport 22 -j ACCEPT iptables -A OUTPUT -s 0/0 -d ip.ip.ip -p tcp --dport 22 -j ACCEPT iptables -A INPUT -s 0/0 -d ip.ip.ip-p udp --dport 22 -j ACCEPT iptables -A OUTPUT -s 0/0 -d ip.ip.ip -p udp --dport 22 -j ACCEPT iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 300 --hitcount 3 $ iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED iptables -A FORWARD -j ACCEPT -m state --state ESTABLISHED,RELATED iptables -A OUTPUT -j ACCEPT -m state --state ESTABLISHED,RELATED iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE iptables -A FORWARD -s 192.168.1.0/24 -j ACCEPT iptables -t nat -A PREROUTING -p tcp -d ip.ip.ip --dport 20:21 -j DNAT --to 192.168.1.2 Na debianie dziala demon FTP vsftpd i na tego dostac sie moge bez problemu. Ale mi chodzi wlasnie o ten FTP ktory stoi za debianem. Ktos wie gdzie jest blad?
Technical Details
Message-ID:
<ftaapb$tft$1@node2.news.atman.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.atman.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.atman.pl!not-for-mail From: "Obserwator" <obserwator@chello.pl> Newsgroups: alt.pl.comp.os.linux.debian Subject: Debian gateway - problem z przekierowaniem Date: Sun, 6 Apr 2008 13:06:21 +0200 Organization: ATMAN Lines: 46 Message-ID: <ftaapb$tft$1@node2.news.atman.pl> NNTP-Posting-Host: chello062179054177.chello.pl X-Trace: node2.news.atman.pl 1207479915 30205 62.179.54.177 (6 Apr 2008 11:05:15 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Sun, 6 Apr 2008 11:05:15 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit