Dnat with 3.051 Version

Hello all,

I'm newby and i've just installed the 3.050 V and upgrade it to the 3.051. I'm trying to DNAT a Serveur in my LAN with port 82.

I want to have WAN --> ASF --> Server.
i have only 2 Network Card. Eth0 for my LAN with IP 10.0.0.230 and Eth1 for my Wan (62.161.226.102).

How can i configure the DNAT to root client to my serveur when the request is http://mydomain:82/ ???

i've made a NAT Rule with :
Match Parameters :Any -> eth1_Interface_/port 82
SRC Translation : none
DST Translation : Server

And Packet Filter Rule
Any -> Port 82 -> Server -> Allow

And when i try http://62.161.226.102:82/ it doesn't root me to my Server, why ?

Thank's..
Parents
  • config is correct so far...

    try looking:
    - defined service
    - filter live log
  • I've it :

    Chain PREROUTING (policy ACCEPT 26706 packets, 3306K bytes)
     pkts bytes target     prot opt in     out     source               destination         
       15  1303 SPOOF_DROP  all  --  *      *       0.0.0.0/0            0.0.0.0/0          
       15  1303 AUTO_NAT_PRE  all  --  *      *       0.0.0.0/0            0.0.0.0/0          

    Chain POSTROUTING (policy ACCEPT 2358 packets, 241K bytes)
     pkts bytes target     prot opt in     out     source               destination         
        4   304 AUTO_NAT_POST  all  --  *      *       0.0.0.0/0            0.0.0.0/0          

    Chain OUTPUT (policy ACCEPT 5239 packets, 416K bytes)
     pkts bytes target     prot opt in     out     source               destination         
        2   208 AUTO_NAT_OUT  all  --  *      *       0.0.0.0/0            0.0.0.0/0          

    Chain AUTO_NAT_OUT (1 references)
     pkts bytes target     prot opt in     out     source               destination         
        0     0 DNAT       tcp  --  *      *       0.0.0.0/0            62.161.226.102     tcp dpt:82 to:10.0.0.100 

    Chain AUTO_NAT_POST (1 references)
     pkts bytes target     prot opt in     out     source               destination         
        2    96 MASQUERADE  all  --  *      eth1    10.0.0.0/24          0.0.0.0/0          
        0     0 MASQUERADE  all  --  *      eth1    62.161.226.102       0.0.0.0/0          
        0     0 MASQUERADE  all  --  *      eth0    10.0.0.0/24          0.0.0.0/0          

    Chain AUTO_NAT_PRE (1 references)
     pkts bytes target     prot opt in     out     source               destination         
        0     0 DNAT       tcp  --  *      *       0.0.0.0/0            62.161.226.102     tcp dpt:82 to:10.0.0.100 
        0     0 REDIRECT   tcp  --  *      *       10.0.0.0/24          0.0.0.0/0          tcp spts:1024:65535 dpt:80 redir ports 8080 

    Chain LOGDROP (0 references)
     pkts bytes target     prot opt in     out     source               destination         
        0     0 LOG        tcp  --  *      *       0.0.0.0/0            0.0.0.0/0          
        0     0 LOG        udp  --  *      *       0.0.0.0/0            0.0.0.0/0          
        0     0 LOG        esp  --  *      *       0.0.0.0/0            0.0.0.0/0          
        0     0 LOG        ah   --  *      *       0.0.0.0/0            0.0.0.0/0          
        0     0 LOG        icmp --  *      *       0.0.0.0/0            0.0.0.0/0          
        0     0 LOG        all  -f  *      *       0.0.0.0/0            0.0.0.0/0          
        0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0          

    Chain SPOOF_DROP (1 references)
     pkts bytes target     prot opt in     out     source               destination         
        0     0 LOG        all  --  eth0   *       10.0.0.230           0.0.0.0/0          
        0     0 DROP       all  --  eth0   *       10.0.0.230           0.0.0.0/0          
        0     0 LOG        all  --  eth0   *       62.161.226.0/24      0.0.0.0/0          
        0     0 DROP       all  --  eth0   *       62.161.226.0/24      0.0.0.0/0          
        0     0 LOG        all  --  eth1   *       62.161.226.102       0.0.0.0/0          
        0     0 DROP       all  --  eth1   *       62.161.226.102       0.0.0.0/0          
        0     0 LOG        all  --  eth1   *       10.0.0.0/24          0.0.0.0/0          
        0     0 DROP       all  --  eth1   *       10.0.0.0/24          0.0.0.0/0      

    Is-it correct ??
  • wow,
    too many numbers for me ... ;-)

    you gave the asl-box on outer interface the ip-nr, that you want to use for dnat to the server?
    I've done it with ip-aliases on the outer interface, so it has one for asl itself, and the alias for dnat .... maybe this makes a difference?

    well you have a dNAT rule for incoming.
    do you have a sNAT rule for outgoing??
    like:
     source: SERVER
       dest: any,
    service: any (here it works;-)
    SRC Translation: outer IP
    DST Translation: none

    else you may get a one-way street to your server 

    kind regards, christian
Reply
  • wow,
    too many numbers for me ... ;-)

    you gave the asl-box on outer interface the ip-nr, that you want to use for dnat to the server?
    I've done it with ip-aliases on the outer interface, so it has one for asl itself, and the alias for dnat .... maybe this makes a difference?

    well you have a dNAT rule for incoming.
    do you have a sNAT rule for outgoing??
    like:
     source: SERVER
       dest: any,
    service: any (here it works;-)
    SRC Translation: outer IP
    DST Translation: none

    else you may get a one-way street to your server 

    kind regards, christian
Children
  • hi chris,

    why SNAT? it isn't needed at all ...

    1. only connections from external to internal are needed (see first posting)
    2. if the server itself connects to external devices, there has to be a kind of masquerading because it has an inofficial IP address


    bye,
    michael
  • Not needed?

    I'll try this....
    i thought, the server should answer to outside so it needs an snat rule for this.
    if it doesn't, i was wrong, sorry.

    Is astaro doing the reverse adress translation automatically?

    kind regards, christian
  • I'm trying to do the same type of thing. I want to set up a ftp server at an IP that is redirected to another IP. Ex. ftp://hostname.com redirects to an internal IP (192.168.0.2) running an FTP server.

    I created the following DNAT rule:

    Rule: FTP Test
    Match: Any -> eth1_Network__ / FTP
    SRC: None
    Dest: Stan / FTP
    (Stan is set to IP: 192.168.0.2)

    Do I need to add anything else?

    When I try to connect to our hostname.com with an FTP client, it just keeps trying. If I look at the log for the FTP Server it sees a connection, but nothing comes back.

    Any help will be appreciated. I'm fairly new to this.

    Thanks,
    Robert Birch

    [ 15 May 2002: Message edited by: rbirch ]

  • quote:
    Originally posted by rbirch:
    I'm trying to do the same type of thing. I want to set up a ftp server at an IP that is redirected to another IP. Ex. ftp://hostname.com redirects to an internal IP (192.168.0.2) running an FTP server.

    I created the following DNAT rule:

    Rule: FTP Test
    Match: Any -> eth1_Network__ / FTP
    SRC: None
    Dest: Stan / FTP
    (Stan is set to IP: 192.168.0.2)

    Do I need to add anything else?

    When I try to connect to our hostname.com with an FTP client, it just keeps trying. If I look at the log for the FTP Server it sees a connection, but nothing comes back.

    Any help will be appreciated. I'm fairly new to this.

    Thanks,
    Robert Birch

    [ 15 May 2002: Message edited by: rbirch ]



    Did you add a packet filter rule to allow ftp traffic through to the server?
  • I have the following rules set:

    From: _eth0_Network___ (Internet)
    Service: FTP
    Server: Any
    Action: Allow

            AND

    From: _etho_Network__
    Service: FTP-Control
    Server: Any
    Action: Allow


    I thought was all I would need. I could be wrong.

    Thanks for the help. It is greatly appreciated.

    Robert Birch