iptables: two simple questions
From: Reiner Griess (mynewnews@gmx.net)Date: 01/31/02
- Next message: GhostFaceKilla: "Sonicwall DMZ and ADSL"
- Previous message: james Placer: "Checkpoint VPN problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: mynewnews@gmx.net (Reiner Griess) Date: 31 Jan 2002 21:08:52 GMT
Hi there,
I'm using OpenBSD as a firewall. No problems here. Now I want
to have the following three rules implemented in _iptables for linux_
(RH7.2).
1) rdr on <ftp_if> from any to <ftp_ip> port 21 -> <ext_ip> port 21
and
2) nat on <ftp_if> from <ext_ip> to any -> <ftp_ip>
and
3) rdr on <ftp_if> from any to <ftp_ip> port 49152 -> <ext_ip> port
49152
I've tried this for number 1:
iptables -t nat -A PREROUTING -p tcp -i eth0 -s 0/0 -d 192.168.1.4
--dport 21 -j DNAT --to-destination 80.131.76.12:21
and this for number 2:
iptables -t nat -A POSTROUTING -p tcp -o eth0 -s 80.131.76.12 -d 0/0
-j MASQUERADE
and this for number 3:
iptables -t nat -A PREROUTING -p tcp -i eth0 -s 0/0 -d 192.168.10.4
--dport 49152 -j DNAT --to-destination 80.131.76.12:49152
It seems not to work....
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Any help out there?
Thanks
reiner
- Next message: GhostFaceKilla: "Sonicwall DMZ and ADSL"
- Previous message: james Placer: "Checkpoint VPN problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|