* Re: Very basic question
@ 2004-09-24 11:09 Eric Leblond
0 siblings, 0 replies; 5+ messages in thread
From: Eric Leblond @ 2004-09-24 11:09 UTC (permalink / raw)
To: netfilter
On Fri, 2004-09-24 at 12:28, coding@digital-data.co.uk wrote:
> 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.
> Ie forward all incoming traffic on eth2 going to address 213.249.230.206 to
> 192.168.10.2 on eth1.
only one is enough
> iptables -t nat -A PREROUTING -i eth2 -s 213.249.230.206 -j DNAT --to
> 192.168.10.2
traffic to 213.249.230.206 thus -d not -s :
iptables -t nat -A PREROUTING -i eth2 -d 213.249.230.206 -j DNAT --to
192.168.10.2
--
Eric Leblond <eric@inl.fr>
INL
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20040924102247.3335375B@smtp-01.piensasolutions.com>]
* Re: Very basic question
[not found] <20040924102247.3335375B@smtp-01.piensasolutions.com>
@ 2004-09-26 20:34 ` Jose Maria Lopez
0 siblings, 0 replies; 5+ messages in thread
From: Jose Maria Lopez @ 2004-09-26 20:34 UTC (permalink / raw)
To: netfilter@lists.netfilter.org
El vie, 24 de 09 de 2004 a las 12:28, coding@digital-data.co.uk
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:
>
>
>
> 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.
>
>
> What am I doing wrong?
>
>
>
> Tom
>
>
--
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
jkerouac@bgsec.com
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"
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1096028483.12880.0.camel@aflores>]
* Re: Very basic question.
[not found] <1096028483.12880.0.camel@aflores>
@ 2004-09-24 13:08 ` Alejandro Flores
0 siblings, 0 replies; 5+ messages in thread
From: Alejandro Flores @ 2004-09-24 13:08 UTC (permalink / raw)
To: tom; +Cc: netfilter
Hello,
> I have tried the following, but it just seems to redirect all traffic to the
> local firewall:
> iptables -t nat -A POSTROUTING -o eth1 -s 192.168.10.2 -j SNAT --to
> 213.249.230.206
1. -o = output interface. Your local network is connected to eth1,
wright? And you want to NAT all connections from 192.168.10.2 to
internet as 213.249.230.206, wright?
iptables -t nat -A POSTROUTING -o eth2 -s 192.168.10.2/32 -j SNAT
--to-source 213.249.230.206
> iptables -t nat -A PREROUTING -i eth2 -s 213.249.230.206 -j DNAT --to
> 192.168.10.2
2. -s = source. You want redirect the traffic that comes from the
internet which destination is 213.249.230.206 to your internal pc
192.168.10.2, wright?
iptables -t nat -A PREROUTING -i eth2 -d 213.249.230.206 -j DNAT
--to-destination 192.168.10.2
Regards,
--
--
Alejandro Flores
http://www.triforsec.com.br/
http://www.defenselayer.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Very basic question
@ 2004-09-24 10:28 coding
0 siblings, 0 replies; 5+ messages in thread
From: coding @ 2004-09-24 10:28 UTC (permalink / raw)
To: netfilter
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:
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
What am I doing wrong?
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread* Very basic question.
@ 2004-09-24 10:26 tom
0 siblings, 0 replies; 5+ messages in thread
From: tom @ 2004-09-24 10:26 UTC (permalink / raw)
To: netfilter
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:
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
What am I doing wrong?
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-26 20:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-24 11:09 Very basic question Eric Leblond
[not found] <20040924102247.3335375B@smtp-01.piensasolutions.com>
2004-09-26 20:34 ` Jose Maria Lopez
[not found] <1096028483.12880.0.camel@aflores>
2004-09-24 13:08 ` Alejandro Flores
-- strict thread matches above, loose matches on Subject: below --
2004-09-24 10:28 coding
2004-09-24 10:26 tom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox