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

Re: NAT not working on internal network



> `e k i p s wrote:
> > 
> > ## REPOST ##
> > 
> > Hello,
> > i have recently implemented NAT on my OpneBSD box to forward httpd
> requests
> > on port 8080 to a box on an internal IP behind the OpenBSD box.  i have
> a
> > fairly typical setup:
> > 
> > [web server]10.0.0.4---->10.0.0.1[OpenBSD
> 2.8]aaa.bbb.ccc.238--->INTERNET

You have two NIC's in your OpenBSD box?

 is 10.0.0.1 the IP of the Second NIC of the OpenBSD box?
and aaa.bbb.ccc.238 the IP of the first NIC?

Do you have a dynamic IP so that the aaa.bbb.ccc.238 gets replaced by the
real IP on Connect?
> > my rc.conf & sysctl.conf are setup according to the documentation.  ipfw
> and
> > ipnat start fine.  here is the redirect that i am using:
> > 
> > rdr xl0 aaa.bbb.ccc.238/32 port 8080 -> 10.0.0.4 port 80
> > 
> > # ipnat -l:
> > List of active MAP/Redirect filters:
> > map xl0 10.0.0.0/24  -> 24.221.170.238/32  portmap tcp/udp 10000:60000
> > map xl0 10.0.0.0/24  -> 24.221.170.238/32
> > rdr xl0 24.221.170.238/32 port 8080 -> 10.0.0.4 port 80 tcp
> > 
> > List of active sessions:

I have an FTP Server running on my internal network which is also reachable
from outside, I dial up using a DSL connection and my IPNAT looks like this:

rdr tun0 0/0 port 21 -> 192.168.1.3 port 21
map tun0 192.168.1.0/24 -> tun0/32 proxy port ftp ftp/tcp
map tun0 192.168.1.0/24 -> tun0/32 portmap tcp/udp 34000:64000
map tun0 192.168.1.0/24 -> tun0/32 

tun0 = we0 pointing to internet
192.168.1.3 other computer of the internal network running the ftpserver.

Maybe this helps

Carsten

-- 
Aufgepasst - jetzt viele 1&1 New WebHosting Pakete ohne
Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung!
http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a