[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using NAT with multiple protocols


I'm trying to NAT this protocols: HTTPS, FTP (active and passive), NTP, SSH, SMTP, POP3, POP3S, IMAP and IMAPS. But I'm not sure if I'm doing it right.

# This is my network config:
# Internal network:
# External IP: 193.135.345.123

# NAT for HTTPS, FTP (active and passive), SSH, SMTP, POP3, POP3S, IMAP and IMAPS. iptables -t nat -A POSTROUTING -s -p tcp -m multiport --dports 443,21,20,22,25,110,995,143,993 -j SNAT --to-source 193.135.345.123

# NAT for NTP.
iptables -t nat -A POSTROUTING -s -p upd -m multiport --dports 123 -j SNAT --to-source 193.135.345.123

I have also loaded these modules:
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp

  Patrício Batista

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply to: