Re: simple netfilter machine redirection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Sun, 16 Mar 2008, Marty Leisner wrote:

I want to accomplish something simple with iptables..
(I've used IPtables successfully without really understanding how to do
something from scratch -- I just followed "recipes")

I want machine A to redirect port 80 to machine B.

What's a way to do it?  (seems simple enough).

I've tried a number of ways, and nothing seems to work...

(the machine isn't a firewall)

marty

152] How do I forward a port from the internet to the LAN? iptables -A PREROUTING -i eth0 -t nat -p tcp --dport 22 -j DNAT --to 192.168.0.5:22

Forward port 22 -> internally to host 192.168.0.5:22 for instance.

.. and yes I did test this just now, it still works :)

Justin.

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux