All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Destination Nat
@ 2004-05-28 14:18 black
  2004-05-29  1:56 ` John A. Sullivan III
  0 siblings, 1 reply; 19+ messages in thread
From: black @ 2004-05-28 14:18 UTC (permalink / raw)
  To: netfilter


would it be 8080 or 80? the web server has a static ip
address
on the inside 192.168.x.x

> That will direct all 80 /tcp packets for all addresses the
> station listens on to 5.6.7.8:8080? Is that what you want
> or do you want to redirect packets with a specific
> destination address? If the public Internet address is not
> an IP address bound to the NAT gateway, then you will need
> to add it, typically: ip address add 1.1.1.2/24 dev eth0
> brd + 

john


^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: Destination Nat
@ 2004-06-04 16:14 black
  2004-06-04 16:44 ` John A. Sullivan III
  0 siblings, 1 reply; 19+ messages in thread
From: black @ 2004-06-04 16:14 UTC (permalink / raw)
  To: netfilter

> What are the other rules?

iptables -t nat -A PREROUTING -d 5.6.7.8 -p tcp \
 --dport 22 -j DNAT --to 192.168.1.81:22

iptables -t nat -A PREROUTING -d 5.6.7.8 -p tcp \
 --dport 22 -j DNAT --to 192.168.1.82:22

iptables -t nat -A PREROUTING -d 5.6.7.8 -p tcp \
 --dport 22 -j DNAT --to 192.168.1.83:22

iptables -t nat -A PREROUTING -d 5.6.7.8 -p tcp \
 --dport 22 -j DNAT --to 192.168.1.88:22

john



^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: Destination Nat
@ 2004-06-04 15:45 black
  2004-06-04 16:14 ` John A. Sullivan III
  0 siblings, 1 reply; 19+ messages in thread
From: black @ 2004-06-04 15:45 UTC (permalink / raw)
  To: netfilter


the rule set:
iptables -t nat -A PREROUTING -d 5.6.7.8 -p 6 --dport 80 -j
DNAT --to 192.168.x.x:80 worked perfectly

thank you

but i have a new question.  i'm trying to setup so the users
can access the machines through ssh.  

here is the rule set:
iptables -t nat -A PREROUTING -d 5.6.7.8 -p tcp --dport 22
-j DNAT --to 192.168.1.88:22

the problem is when i ssh in to machine8 which is on static
ipaddress 192.168.1.88 i actully log into machine1 which is
192.168.1.81, which is the first machine in the rule set. 
where did i go wrong?

thanks
john 



^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: Destination Nat
@ 2004-06-02 15:20 Piszcz, Justin Michael
  0 siblings, 0 replies; 19+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-02 15:20 UTC (permalink / raw)
  To: Alistair Tonner, netfilter

Does anyone know how the data is processed?
Does it perform a lookup if it is, ie: icmp,tcp,udp etc or does it store
it in numeric form?

-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Alistair
Tonner
Sent: Wednesday, June 02, 2004 11:14 AM
To: netfilter@lists.netfilter.org
Subject: Re: Destination Nat

On June 2, 2004 07:19 am, John A. Sullivan III wrote:
> -p 6 is the same as -p tcp only a little faster as it does not have to
> look up tcp in the protocols file and translate it from tcp to 6.  UDP
> would be -p 17, ICMP -p 1, ESP -p 50, etc.

	That lookup would only be done when the rule was posted or
loaded.
	Thus - the time saving is only on loading the rule.  
	I believe that the rule data is *all* stored in numeric form ...
	But I could be completely wrong on that front.

	Alistair.
>
> On Tue, 2004-06-01 at 23:38, John Black wrote:
> > thanks, ill give it a try tomorrow when i get to work.  what is the
-p 6?
> > ----- Original Message -----
> > From: John A. Sullivan III <john.sullivan@nexusmgmt.com>
> > To: <black@arbbs.net>
> > Cc: <netfilter@lists.netfilter.org>
> > Sent: Friday, May 28, 2004 8:56 PM
> > Subject: Re: Destination Nat
> >
> > > If I understand you correctly and remember your original rule,
then I
> > > think you have it backward.  If you are changing the destination,
you
> > > probably want to change it from the public address to the private
> > > address:
> >
> > john





^ permalink raw reply	[flat|nested] 19+ messages in thread
* Destination Nat
@ 2004-05-28 13:46 black
  2004-05-28 14:18 ` John A. Sullivan III
  0 siblings, 1 reply; 19+ messages in thread
From: black @ 2004-05-28 13:46 UTC (permalink / raw)
  To: netfilter

Im running at red hat 9 and iptables 1.2.7

im trying to direct web traffic to the web server on the
inside.  
is [ iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0
 -j DNAT --to 5.6.7.8:8080 ] right?

thanks
john


^ permalink raw reply	[flat|nested] 19+ messages in thread
* Destination NAT
@ 2004-01-28 20:45 Ale Zeta
  0 siblings, 0 replies; 19+ messages in thread
From: Ale Zeta @ 2004-01-28 20:45 UTC (permalink / raw)
  To: netfilter

Can I address an UDP packet to more than one IP address at the same time ??

I have   iptables -t nat -A PREROUTING -i eth1 -j DNAT --to 5.6.7.8-5.6.7.10 
  as an example, but I want to send the packets to both 7.8 and also 7.10 
and not doing the load balancing thing....

Is it possible to do ???


From Buenos Aires, Argentina.


Alex.-

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus



^ permalink raw reply	[flat|nested] 19+ messages in thread
* Destination NAT
@ 2004-01-28 14:21 Alejandro Zaidel
  2004-01-29  9:13 ` Antony Stone
  0 siblings, 1 reply; 19+ messages in thread
From: Alejandro Zaidel @ 2004-01-28 14:21 UTC (permalink / raw)
  To: netfilter


Can I address a packet to more than one IP address at the same time ??

I have   iptables -t nat -A PREROUTING -i eth1 -j DNAT --to 5.6.7.8-5.6.7.10  as an example, but I want to send the packets to both 7.8 and also 7.10

Is it possible to do ???


From Buenos Aires, Argentina.


Alex.-

La informacion contenida en este correo es para uso exclusivo de los destinatarios del mismo.
Esta prohibido a las personas o entidades que no sean los destinatarios de este correo
realizar cualquier tipo de modificacion, copia o distribucion del mismo.
Si Usted recibe este correo por error tenga bien notificar al emisor y eliminarlo.


^ permalink raw reply	[flat|nested] 19+ messages in thread
* Destination NAT
@ 2003-03-14 11:01 Sathi
  0 siblings, 0 replies; 19+ messages in thread
From: Sathi @ 2003-03-14 11:01 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

Hello All,

I am running squid as reverse proxy and its working fine.

Now i need to set iptables rules to forward ftp ports directly to backend server for file upload.

I set in prerouting rule as

/sbin/iptables -t nat -A PREROUTING -p tcp --dport 20 -d 172.16.1.10 -j DNAT --to 172.16.1.25
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 21 -d 172.16.1.10 -j DNAT --to 172.16.1.25

Note: Reverse proxy and backend servers are running in same network.and by reverse proxy has only one network interface.

but i was not able to connect to backend server.

In tcpdump i can see a request from client to squid server but it is not forwarding to backend server.

What is the correct rule to forward the ftp ports to backend server.

Regards,
Sathi

[-- Attachment #2: Type: text/html, Size: 1566 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2004-06-04 16:44 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-28 14:18 Destination Nat black
2004-05-29  1:56 ` John A. Sullivan III
2004-06-02  3:38   ` John Black
2004-06-02 11:19     ` John A. Sullivan III
2004-06-02 11:53       ` John Black
2004-06-02 15:13       ` Alistair Tonner
  -- strict thread matches above, loose matches on Subject: below --
2004-06-04 16:14 black
2004-06-04 16:44 ` John A. Sullivan III
2004-06-04 15:45 black
2004-06-04 16:14 ` John A. Sullivan III
2004-06-02 15:20 Piszcz, Justin Michael
2004-05-28 13:46 black
2004-05-28 14:18 ` John A. Sullivan III
2004-01-28 20:45 Destination NAT Ale Zeta
2004-01-28 14:21 Alejandro Zaidel
2004-01-29  9:13 ` Antony Stone
2004-01-29  9:47   ` Ray Leach
2004-01-29  9:46     ` Antony Stone
2003-03-14 11:01 Sathi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.