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

s2s Ipsec using public ips?

 need to setup a site to site ipsec vpn with a partner company, they provided me the standard connection sheet but both the firewall endpoint and internal access are both public ips

Example

Customer

Firewall Address   147.118.246.5 (PUBLIC IP)

Internal Server Access :  147.118.246.50 port 666 (PUBLIC IP)

My Sophos UTM 9

Firewall address 200.10.10.5 (PUBLIC IP)

Internal Server Access : 10.10.10.50 port 666 (PRIVATE IP)

The partner is expecting me to provide a public ip as well for phase 2, what Ip should I provide?

How should I configure the tunnel ? 

Any help will be apreciated

Thanks

Gaston



This thread was automatically locked due to age.
  • Routes for IPsec tunnels have the highest priority, Gaston, so the solution should be very easy to do.  I'm a little confused though by your comment about using a public IP for Phase 2.  Phase 2 is the second of two phases in establishing an IPsec tunnel.  If you mean that the partner wants all traffic in the tunnel from you to come from a public IP, the following will need to be modified a bit...

    In the IPsec Connection, put 10.10.10.50 (or whatever subnet should be able to access their server) in 'Local Networks'.  In the Remote Gateway, put 147.118.246.50 (or whatever subnet should be accessible from your end).  If you only want to allow port 666 traffic from your side to theirs, don't select 'Automatic firewall rules' in the IPsec Connection and add an appropriate firewall rule.

    Does that do what you wanted?

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Thanks Bob

    Just to clarify

    The request is a tradition site to site Ipsec vpn, the problem is that they provided a public ip ( public routable IP addresses ) for the server resource and they expect as well for me to provide a public ip as well.

    They way I am thinking in doing is is the follow

    On my UTM I setup remote network either as a a host or a /25 network

    In order for me to provide a public ip for my internal server, I setup a 1:1 NAT with an extra newly  added to my firewall public ip and the private ip with the internal resource.

    The requirement is a tunnel to connect public ip to public ip ( server to server ) on the port 666

    The tunnel also will require proxy id which should be the public ip, I wonder if the NAT will be able to pass the proper proxy id

    Will that work? Could you advise in the proxy id?

     

    Thanks in advance

     

    Gaston

     

  • I really don't get the point why a publicly routable address should be inside a tunnel. We have this at one of our customers who themselves have a large pool of public addresses and they have assigned a small subnet of those to us which we need in our tunnel. This is done through NAT inside the tunnel.

    However in your case you should be the one to supply 1 public address for the VPN (obvious) and another public IP for reaching a server inside the VPN (not obvious to me). However you could simply "make up" a fake public IP and have this NATted inside the tunnel.

    Problem for your client is that if that made up IP-address is in use somewhere else on the internet, they won't be able to reach it...


    Managing several Sophos firewalls both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

  • I'm still not sure that I understand their requirements.  Do they want to see all traffic coming from you to be from a single public IP?  If this is what they want, then use that public IP (say 216.x.y.241) as the only entry in 'Local Networks' and 'Strict routing' should not be selected.  The address(es) you want to reach on their side should go into 'Remote Networks'.

    The trick to making this work is a NAT rule that SNATs the desired traffic into the tunnel:

    SNAT : {your addresses} -> {allowed ports} -> {their addresses} : from 216.x.y.241

    Was that what you were looking for?

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi, let me try to clarify further

     

    Hi, they just want communication those 2 hosts based on public ips on port 666, they want to implement a message queueing service

    It should be like this 

    Starting from my side

    10.10.10.50  Port 666 (Public ip) <-> 200.10.10.50 (NAT Private ip) Port 666 <-> 200.10.10.5 (My firewall address) <-> 147.118.246.5 (Remote Firewall Endpoint - Public ip) <-> 147.118.246.50 Port 666 (Pubic Ip)

     

    So my questions are

     

    1- What type of NAT should I setup in order to make this work

    2- Will the ID match the Public ip ( 200.10.10.50 ) or it will show the private ip  (10.10.10.50)

    3- Will just creating the NAT and using their public ip as remote network (single host in this case) 147.118.246.50 will be suficient or do I need to create extra routing or rule in order to make this work?

     

    Thanks a lot 

     

    Gaston

  • I hope I get the question now and maybe you have some help with this:147.118.246.5

    The other party wants your system(s) to communicate over a VPN-connection to 147.118.246.50. You can reach that through a VPN-tunnel with their endpoint at 147.118.246.5

    So you can create a remote IPSec gateway with IP 147.118.246.5 and remote network 147.118.246.50.
    then in setting up the connection you use your external WAN connection as the local interface for creating the tunnel (200.10.10.5). In your local network(s) you could simply enter 10.10.10.50 (as that is the local server at your side that needs to communicate with remote side). Then that's also what they need to enter at their side as their remote network (that's your local network).

    However if for some reason they cannot handle 10.10.10.50, then you must supply something else (and also configure that something else in you own local network(s) setting). If that something else has to be a public address (again, I really don't know why), then you must either own additional public addresses or make some up. In the first place, if you own a subnet including more than just 200.10.10.5 then you could assign ie. 200.10.10.6 and have this configured as your local network. Be sure tough to use a public address that you haven't configured as an additional address since it will most likely create routing issues on you own UTM.

    Assuming you want to use 200.10.10.6 you then need an SNAT rule:

    Traffic from: 10.10.10.50
    Using service: 666 (or any, but if you only need port 666 then go ahead and use that)
    Going to: 147.118.246.50

    Change source to: 200.10.10.6

    Create automatic firewall rule and be sure to also select 'Rule applies to IPSec packets' under advanced

     

    You will then also need a DNAT rule (for the return traffic):

    Traffic from: 147.118.246.50
    Using service: 666 (or any again, just like above)
    Going to: 200.10.10.6

    Change destination to: 10.10.10.50

    Again tick 'Use automatic firewall rule'.

    But please, do try to have the other party just use 10.10.10.50 as your local (their remote) computer.


    Managing several Sophos firewalls both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

  • Is this the topology?

    Your Server <-> Your UTM <- IPsec VPN -> Their VPN endpoint <-> Their server

    Is there another firewall in this chain?

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi Bob,

                 I don't think there is another firewall in the chain, not 100 % sure on the other on, but from my side your topology is correct.

     

    Thanks

     

    Gaston

  • Guys, thank you very much for all your help.

    We were able to implement the Site 2 Site and Ipsec is working , we have a healthy tunnel.

    Problem is I still can access the remote public ip host, I am suspecting I am missing a step or the SNAT is not doing what it should.


    So right now I have a healthy tunnel configured this way

    200.10.10.5 (My firewall address) <-> 147.118.246.5 (remote firewall address) tunnel is working

    With regards of the internal hosts (public ips)

    I have added as my local network 200.10.10.50 which I own, but is not an ip configured in the Sophos.

    Then I have created a SNAT rule as follows


    For traffic from 10.10.10.50 (Private ip from my internal server)
    Using Service Port 666 (I tried any as well with same results)
    going to 147.118.246.50
    Change the source to 200.10.10.50

    When I look at the real time log I see an allowed connection (Green) from

    10.10.10.50 to 147.118.246.50 , but I was expecting to see from 200.10.10.50 to 147.118.246.50

    They guys on on the other firewall can't see any traffic on the tunnel coming from me.

    Did I miss anything? what would be the best way for me to see the traffic coming out of my UTM?

    Any help will be appreciated.

    Thanks

    Gaston

  • Gaston, please sow pictures of the Edits of the IPsec Connection and Remote Gateway with 'Advanced' open.  Also pics of the corresponding configurations on the other side.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA