This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need help with NAT translations.

Hi.

I am a bit new here. I think this question has been made a few times around here.

So here it is. 

I need to make a NAT rule that hides my internal ip addres 192.168.0.5 to a public /30 ip address ( wee have 256 addresses ). 

I have made a additional adders for the server and mapped this address to it with SNAT ( WAN -> SNAT -> Internal ip ).

I cant figure out how to make the reverse of this
so my server would access the internet wit its ip address.

Thanks.


This thread was automatically locked due to age.
Parents
  • Hi, Erik, and welcome to this place!

    In order for internal devices to access the world of public IPs, you need a masquerading rule: 'Internal (Address) -> External' interface.  But, I get the impression that you already have done that.

    In order to offer, for example, an internal web server to the outside world, you need a DNAT rule.  Assuming your 'Additional Address' on the Extrernal interface is "Webserver" -

    Any -> HTTP -> Webserver (Address) : DNAT to  [Internal IP of server]


    In the DNAT, since the service doesn't change, leave the 'Destination Service' field empty.

    Does that do what you need?

    Cheers - Bob
    PS Many questions like this one can be answered by documents in the Astaro Knowledgebase.
  • Hi,
    An SNAT would map outgoing traffic to a specific external address, assuming you already have an "extra IP address" assigned to the EXT NIC with the desired external IP.

    If you are going to setup an SNAT, it would look like
    SNAT ( INT Server -> SNAT -> EXTERNAL ip ).

    You'd still need the DNAT for the incoming traffic.

    Don't forget PacketFilter rules for any incoming or outgoing traffic.

    Barry
  • Thanks for the quick replay. 

    I think I have to explain it a bit more.
    My config is like this.

    WAN0 is configured with xx.xx.xx.30 external ip adders and it has 8 additional addresses attached to it. WAN0 is connected to a Cisco router which  manages the BGP protocol. I have configured masquerading like this.
    InternalSRV -> WAN0/external additional address.
    any -> WAN0

    I have configured DNAT which works like it should.
    I have configured SNAT like this
    SNAT rule

    NAME : ***
    Traffic source: Internal ip address
    Traffic Service: HTTP
    Traffic Destination: Any
    NAT MODE: SNAT
    SOURCE: WAN0/External addition address ( Address )
    Source Service: HTTP
    Automatic pocket filter rule: checked


    ... 
    and I still cant access the net with the additional external ip address. 

    So what I am doing wrong? 


    Thanks for the replay!
Reply
  • Thanks for the quick replay. 

    I think I have to explain it a bit more.
    My config is like this.

    WAN0 is configured with xx.xx.xx.30 external ip adders and it has 8 additional addresses attached to it. WAN0 is connected to a Cisco router which  manages the BGP protocol. I have configured masquerading like this.
    InternalSRV -> WAN0/external additional address.
    any -> WAN0

    I have configured DNAT which works like it should.
    I have configured SNAT like this
    SNAT rule

    NAME : ***
    Traffic source: Internal ip address
    Traffic Service: HTTP
    Traffic Destination: Any
    NAT MODE: SNAT
    SOURCE: WAN0/External addition address ( Address )
    Source Service: HTTP
    Automatic pocket filter rule: checked


    ... 
    and I still cant access the net with the additional external ip address. 

    So what I am doing wrong? 


    Thanks for the replay!
Children
  • I have configured masquerading like this.
    InternalSRV -> WAN0/external additional address.
    any -> WAN0


    I'm not sure I'm reading this right, but you shouldn't have more than one Masquerading setting per LAN... a masquerading rule should look like:
    Network: LAN
    Interface: External

    and, if you have a DMZ:
    Network: DMZ
    Interface: External

    with only one Masq for each internal Network.
    You should never put "ANY" in a Masquerading rule!


    Do you have a PacketFilter rule allowing outbound http traffic from that internal IP?

    once all of the above are straightened out,
    Note that outgoing traffic should work whether you have the SNAT enabled or not. If SNAT is disabled, Masquerading would be in effect.
    Either way, you still need a PacketFilter rule.

    Barry