{"id":266,"date":"2017-08-13T17:19:29","date_gmt":"2017-08-13T21:19:29","guid":{"rendered":"http:\/\/puluka.com\/home\/?p=266"},"modified":"2017-08-13T17:19:29","modified_gmt":"2017-08-13T21:19:29","slug":"screenos-remote-site-server-published-on-local-site-public-ip-address","status":"publish","type":"post","link":"http:\/\/puluka.com\/home\/networking\/screenos\/screenos-remote-site-server-published-on-local-site-public-ip-address\/","title":{"rendered":"ScreenOS \u2013 Remote Site Server Published on Local Site Public IP Address"},"content":{"rendered":"<p><strong>Product<\/strong>: ScreenOS<br \/>\n<strong>Version<\/strong>: 6.0 and higher<\/p>\n<h2>Network Topology<\/h2>\n<p><a href=\"http:\/\/puluka.com\/home\/wp-content\/uploads\/2017\/08\/ServerRemoteVPN.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-267\" src=\"http:\/\/puluka.com\/home\/wp-content\/uploads\/2017\/08\/ServerRemoteVPN-300x182.jpg\" alt=\"\" width=\"300\" height=\"182\" srcset=\"http:\/\/puluka.com\/home\/wp-content\/uploads\/2017\/08\/ServerRemoteVPN-300x182.jpg 300w, http:\/\/puluka.com\/home\/wp-content\/uploads\/2017\/08\/ServerRemoteVPN-768x466.jpg 768w, http:\/\/puluka.com\/home\/wp-content\/uploads\/2017\/08\/ServerRemoteVPN-1024x621.jpg 1024w, http:\/\/puluka.com\/home\/wp-content\/uploads\/2017\/08\/ServerRemoteVPN.jpg 1212w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Two sites are connected via a route based VPN, server site and public IP site. The local public ip site publishes a policy to allow internet access to the server. Traffic is forwarded down the vpn tunnel and the responses returned to the internet requester.<\/p>\n<h2>Description:<\/h2>\n<p>The sites have IPSEC VPN in route mode on unnumbered interfaces associated with the local lan ip segment. This allows the inbound internet traffic to also have source address NAT using this egress tunnel interface. Thus the return route for the internet request will be a local site address known to the remote site routing.<\/p>\n<p>The process utilizes IPSEC VPN in route mode and NAT.<\/p>\n<ol>\n<li>Create IPSEC VPN between the sites<\/li>\n<li>Publish the public server ip address at the local site with NAT on both source and destination<\/li>\n<\/ol>\n<h3>Zone Layout<\/h3>\n<p>untrust interface is ethernet0\/0<br \/>\ntrust interface is bgroup0<br \/>\ntunnel.1 interface is in trust zone as a unnumbered interface associated with bgroup0<\/p>\n<p>This zone layout puts all sites and tunnels into the same security zone.\u00a0 No policies need to be created on any device for full communications across the entire hub and spoke network.\u00a0 This is assuming that intra zone blocking is NOT enabled on any of the firewalls for the trust zone.\u00a0 This is the default behavior for the trust zone.<\/p>\n<p>You can change the zone of the tunnel interface to untrust and create policies as needed to allow traffic. But changing the association of the tunnel interface off of the internal lan bgroup0 will necessitate changes in the source nat policy. The source address in nat must be known to the remote server site. You will need to create a dip with a local lan ip address to use for the source nat.<\/p>\n<h2>Configuration:<\/h2>\n<p><strong>1. Create IPSEC VPN between sites<\/strong><\/p>\n<p>Create the tunnel.1 interface on each site as unnumbered and associated with bgroup0. This is the same on both sites.<\/p>\n<p><strong>CLI \u2013 Both Sites<\/strong><br \/>\nset interface tunnel.1 zone Trust<br \/>\nset interface tunnel.1 ip unnumbered interface bgroup0<br \/>\nSet routes to these tunnel interfaces for each remote site<\/p>\n<p><strong>CLI<\/strong><br \/>\n<strong>Public IP site<\/strong><br \/>\nset route 10.0.2.0\/24 interface tunnel.1 gateway 10.0.2.1<br \/>\n<strong>Server Site<\/strong><br \/>\nset route 10.0.1.0\/24 interface tunnel.1 gateway 10.0.1.1<\/p>\n<p><strong>WEB<\/strong><br \/>\n<strong>Public IP site<\/strong><br \/>\nNetwork \u2013 Routing \u2013 Destination<br \/>\nNew button<br \/>\n10.0.2.0\/24<br \/>\ninterface tunnel.1<br \/>\ngateway 10.0.2.1<\/p>\n<p><strong>Server Site<\/strong><br \/>\nNetwork-Routing \u2013 Destination<br \/>\nNew button<br \/>\n10.0.1.0\/24<br \/>\ninterface tunnel.1<br \/>\nGateway 10.0.1.1<\/p>\n<p><strong>WEB<\/strong><br \/>\nNetwork \u2013 Interfaces \u2013 List<br \/>\nNew tunnel interface in the upper right<br \/>\nTrust zone<br \/>\nUnnumbered with the bgroup0 interface<br \/>\nCreate the VPN gateways<\/p>\n<p><strong>CLI<\/strong><br \/>\n<strong>Firewall Local Public Address Site<\/strong><br \/>\nset ike gateway Server-GW address 2.2.2.2 Main outgoing-interface ethernet0\/0 preshare juniper sec-level standard<\/p>\n<p><strong>Firewall Server Site<\/strong><br \/>\nset ike gateway Public-GW address 1.1.1.1 Main outgoing-interface ethernet0\/0 preshare juniper sec-level standard<\/p>\n<p>WEB<br \/>\n<strong>Firewall Local Public Address site<\/strong><br \/>\nVPNs \u2013 AutoKey Advanced \u2013 Gateway<br \/>\nCreate new gateway<br \/>\nName Server-GW<br \/>\nIP: 2.2.2.2<br \/>\nAdvanced button<br \/>\nPreshared key: juniper<br \/>\nOutgoing interface ethernet0\/0 (Change to ethernet 0\/1 for SiteB2-GW)<\/p>\n<p><strong>Firewall Server Site<\/strong><br \/>\nVPNs \u2013 AutoKey Advanced \u2013 Gateway<br \/>\nCreate new gateway<br \/>\nName Public-GW<br \/>\nIP: .1.1.1.1<br \/>\nAdvanced button<br \/>\nPreshared key: juniper<br \/>\nOutgoing interface ethernet0\/0<br \/>\nCreate AutoKey IKE Objects<br \/>\nFirewall Public Address Site<\/p>\n<p><strong>CLI<\/strong><br \/>\nset vpn Server gateway Server-GW sec-level standard<br \/>\nset vpn Server bind interface tunnel.1<\/p>\n<p><strong>WEB<\/strong><br \/>\nVPNs \u2013 AutoKey IKE<br \/>\nCreate New<br \/>\nName Server<br \/>\nAssociated gateway Server-GW<br \/>\nAdvanced button<br \/>\nTunnel interface tunnel.1<br \/>\nFirewall Server Site<\/p>\n<p><strong>CLI<\/strong><br \/>\nset vpn Public gateway Public-GW sec-level standard<br \/>\nset vpn Public bind interface tunnel.1<\/p>\n<p><strong>WEB<\/strong><br \/>\nVPNs \u2013 AutoKey IKE<br \/>\nCreate New<br \/>\nName Public<br \/>\nAssociated gateway Public-GW<br \/>\nAdvanced button<br \/>\nTunnel interface tunnel.1<\/p>\n<p><strong>2. Publish the server pubic ip address and nat policies<\/strong><\/p>\n<p>Enable the proxy arp for destination nat. This is a CLI only command.<\/p>\n<p><strong>CLI<\/strong><br \/>\nset arp nat-dst<\/p>\n<p>Create the pubic address object for the server ip address<\/p>\n<p><strong>CLI<\/strong><br \/>\nset address untrust server 1.1.1.2 255.255.255.255<\/p>\n<p><strong>WEB<\/strong><br \/>\nPolicies \u2013 Policy Objects \u2013 Addresses &#8211; List<br \/>\nNew address in upper right<br \/>\nuntrust zone<br \/>\n1.1.1.2\/32<\/p>\n<p>Create the policy with both destination nat for the server and source nat for the requester<\/p>\n<p><strong>CLI<\/strong><br \/>\nset policy name RemoteServerAccess from Untrust to Untrust Any RemoteServerPublic PING nat src dst ip 10.0.2.2 permit log<br \/>\nChange or add services that are needed in place of PING<\/p>\n<p><strong>WEB<\/strong><br \/>\nPolicies \u2013 Policy \u2013 set untrust to untrust \u2013 Create New<br \/>\nName: RemoteServerAccess<br \/>\nSource: Any<br \/>\nDestination: Server (new address object)<br \/>\nselect the required server services<br \/>\ncheck log button<br \/>\nAdvanced button<br \/>\nCheck destination translation and enter the server ip addess 10.0.2.2<br \/>\nCheck source translation and leave on the default egress interface<\/p>\n<h2>Verification:<\/h2>\n<p>Attempt server access and open the policy log. Verify that both the source and destination translation are occurring as expected.<\/p>\n<h2>References:<\/h2>\n<p><strong>ScreenOS Concepts and Examples Guide<\/strong><br \/>\n<a href=\"http:\/\/www.juniper.net\/techpubs\/software\/screenos\/screenos6.2.0\/index.html\">http:\/\/www.juniper.net\/techpubs\/software\/screenos\/screenos6.2.0\/index.html<\/a><\/p>\n<h3>Route based VPN tunnels<\/h3>\n<p>Concepts &amp; Examples Guide<br \/>\nVolume 5 Virtual Private Networks<br \/>\nChapter 3 VPN Guidelines<br \/>\nChapter 4 VPN: Sit-to-site VPN Configurations<\/p>\n<h3>Network Address Translation<\/h3>\n<p>Concepts &amp; Examples Guide<br \/>\nVolume 8 Address Translation<br \/>\nChapter 3 \u2013 Nat-src and Nat-dst in the same policy<br \/>\nKB12631<br \/>\n<a href=\"http:\/\/kb.juniper.net\/InfoCenter\/index?page=content&amp;id=KB1263\">http:\/\/kb.juniper.net\/InfoCenter\/index?page=content&amp;id=KB1263 <\/a><\/p>\n<p>Originally Posted June 03, 2011<br \/>\nLast Revised on June 03, 2011<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Product: ScreenOS Version: 6.0 and higher Network Topology Two sites are connected via a route based VPN, server site and public IP site. The local public ip site publishes a policy to allow internet access [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-266","post","type-post","status-publish","format-standard","hentry","category-screenos"],"_links":{"self":[{"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/posts\/266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/comments?post=266"}],"version-history":[{"count":1,"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/posts\/266\/revisions"}],"predecessor-version":[{"id":268,"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/posts\/266\/revisions\/268"}],"wp:attachment":[{"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/media?parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/categories?post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/puluka.com\/home\/wp-json\/wp\/v2\/tags?post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}