Membangun Data Center di Rumah


harusnya sama sih tuan, tinggal ubah port nya

Code:
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 21 -j DNAT --to 10.8.0.2:21
iptables -A FORWARD -p tcp -d 10.8.0.2 --dport 21 -j ACCEPT
terima kasih atas response, pada saat saya coba keluar info kesalahan seperti ini
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: MLSD
Error: The data connection could not be established: ECONNREFUSED - Connection refused by server

namun, saat ftp langsung ke 10.8.0.2 bisa. apa yang salah y Tuan
 
namun, saat ftp langsung ke 10.8.0.2 bisa. apa yang salah y Tuan
mengutip dari https://serverfault.com/questions/252425/forward-ftp-with-iptables
To get passive support working, you are going to need to forward the passive ports to the internal ftp server with the same port numbers.

Easy solution: forward all of them all the time

InternetIP:11000-13000 --> 192.168.220.51:11000-13000
sepertinya perlu tambahkan rule iptables baru sebagai berikut:
Code:
iptables -t nat -A PREROUTING -p tcp --dport 11000:13000 -j DNAT --to-destination 10.8.0.2:11000-13000
modprobe nf_conntrack_ftp
modprobe nf_nat_ftp
 
terima kasih atas tanggapan dan jawabannya. setelah pagi ini sy coba masih menampilkan error yang sama tuan...
port FTP tambahannya perlu disamakan.. kalau di cPanel disetting 11000 - 13000 bisa pakai rule yang tadi.. tapi kalau di cPanel atau DA pakai Port lain maka perlu disesuaikan.. silahkan cek dulu Port FTP pakai range berapa..
Biasakan JANGAN ASAL COPAS tanpa tau FUNGSInya
 
Back
Top