Networking Forums

Networking Forums > Computer Networking > Linux Networking > Local DNAT?

Reply
 
 
Frank
Guest
Posts: n/a

 
      04-24-2006, 12:06 PM
Hi,

I got a iptables rules to allow outside hosts connect to my LAN. For
example:
iptables -t nat -A PREROUTING -j DNAT -p tcp --port 8080 --to 192.168.1.2:80

Everyone connecting to me from outside to port 8080 will redirect to
192.168.1.2:80 But for transparancy reason I also need to do this from
the server (work like workstation now and then) where the DNAT rule is
installed to be DNAT-ed to 192.168.1.2:80 when I connect to port 8080 on
the server. But it won't

How can I get this working?


Thanks in advanced,


Frank
 
Reply With Quote
 
 
 
 
Christoph Scheurer
Guest
Posts: n/a

 
      04-25-2006, 05:42 AM
Am Montag, den 24.04.2006, 14:06 +0200 schrieb Frank:
> Hi,
>
> I got a iptables rules to allow outside hosts connect to my LAN. For
> example:
> iptables -t nat -A PREROUTING -j DNAT -p tcp --port 8080 --to 192.168.1.2:80
>
> Everyone connecting to me from outside to port 8080 will redirect to
> 192.168.1.2:80 But for transparancy reason I also need to do this from
> the server (work like workstation now and then) where the DNAT rule is
> installed to be DNAT-ed to 192.168.1.2:80 when I connect to port 8080 on
> the server. But it won't
>

If the mentioned server has 192.168.1.2, then use the rule REDIRECT
--to-ports 80

Greets
Chris Scheurer

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loopback DNAT André Hänsel Linux Networking 5 07-04-2008 10:03 AM
DNAT cap Windows Networking 0 01-18-2006 01:04 PM
Proxy ARP and DNAT manish Linux Networking 0 08-03-2005 03:56 AM
Problems with DNAT. P. Kenter Linux Networking 3 03-04-2005 04:07 PM
Cant get DNAT working on 2.6.7 Joaco Linux Networking 4 08-10-2004 07:59 PM



1 2 3 4 5 6 7 8 9 10 11