iptables question

Gregory Nowak greg at romuald.net.eu.org
Sat Jul 3 18:18:06 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all.

I am trying to setup iptables to transparently redirect out-bound
traffic to any host on port 25 to instead go to IP address
aaa.bbb.ccc.ddd on port 25. So, after doing some searching with
google, and some playing around, I have the following line in my
firewall script:

iptables -t nat -A POSTROUTING -p tcp -o $eth0 --dport 25 -j DNAT
- --to-source aaa.bbb.ccc.ddd

When I run my firewall script to make the new changes take effect, I
get no errors, but I still don't get the desired effect (I.E. doing
telnet speech.braille.uwo.ca 25 for example, still gives me Trying
129.100.109.30... instead of Trying aaa.bbb.ccc.ddd...

Can someone please show me what I'm doing wrong, because everything
looks right to me, (although it obviously isn't), and I'm out of
ideas.

BTW, I'd prefer to use a full host name in iptables, instead of the IP
address, however, I get an error when I try that. Am I missing
something here as well? Thanks for any help in advance.

Greg


- -- 
Free domains: http://www.eu.org/ or mail dns-manager at EU.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFA5zCe7s9z/XlyUyARAvtHAJ9m2EotT0Oy8pPdxpK4hGaMxwP4dACcCSY2
ZMDwqdqvll5qmGtdpXwU/5A=
=eadd
-----END PGP SIGNATURE-----




More information about the Speakup mailing list