Skip to contentSkip to conversation

Very basic question

DISCUSSION Jose Maria Lopez 1 participant 1 message Sep 26, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 20 lines · El vie, 24 de 09 de 2004 a las 12:28, [email protected] escribió:

Hi,

I am very new to trying to use iptables and was wondering if
someone could help me out with what I should do to solve my current problem.

I have a PC with 3 ethernet cards, one is connected to the internet (eth2). I want to use network translation to forward all requests to a pair of static IP addresses I have to particular locales on an internal network (which is accessed through eth1).

Ie forward all incoming traffic on eth2 going to address 213.249.230.206 to 192.168.10.2 on eth1.

I have tried the following, but it just seems to redirect all traffic to the local firewall:

Quoted 6 lines

iptables -t nat -A POSTROUTING -o eth1 -s 192.168.10.2 -j SNAT --to 213.249.230.206

iptables -t nat -A PREROUTING -i eth2 -s 213.249.230.206 -j DNAT --to 192.168.10.2

Just change the -s for -d, because it's a destination IP.

Quoted 9 lines

What am I doing wrong?

Tom

Signature · 12 lines
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
[email protected]
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"