{"id":396,"date":"2015-08-19T13:20:49","date_gmt":"2015-08-19T05:20:49","guid":{"rendered":"http:\/\/www.lanchbury.id.au\/?p=396"},"modified":"2015-08-19T14:01:55","modified_gmt":"2015-08-19T06:01:55","slug":"allow-cisco-ios-outbound-pptp-through-nvi-nat","status":"publish","type":"post","link":"https:\/\/www.lanchbury.au\/?p=396","title":{"rendered":"Allow Cisco iOS Outbound PPTP Through NVI NAT"},"content":{"rendered":"<p>Howdy all, it&#8217;s been a while but I found this and figured it was well worth sharing.  I can&#8217;t say I found the answer to this issue online, and once I got it it seemed easy which might be why.<\/p>\n<p>To explain the title further, this is a home or small branch office internet connection with no VPN servers.  That needs to connect to the office using the old PPTP format VPN.  Hense the PPTP connection is going outbound to a remote server.<\/p>\n<p>Yes PPTP is the worst Virtual Private Network anyone can run, and I really shouldn&#8217;t be promoting it&#8217;s use, but lets say I&#8217;m the Cisco tech and the Windows guys don&#8217;t agree or something&#8230;.<\/p>\n<p>So first you want to add &#8220;ip nat enable&#8221; to the internal and external interfaces, for those of you who know &#8220;ip nat inside\/outside&#8221;, the enable is smart enough to automatically work out which is which.<\/p>\n<p>This won&#8217;t break anything, it just telling the interface to use this technology and which interfaces to use.<br \/>\n<code><br \/>\ninterface Dialer0<br \/>\nip nat enable<br \/>\n!<br \/>\ninterface Vlan1<br \/>\nip nat enable<br \/>\n!<br \/>\ninterface Vlan2<br \/>\nip nat enable<br \/>\n!<br \/>\ninterface Vlan3<br \/>\nip nat enable<br \/>\n<\/code><br \/>\nNow find you existing &#8220;ip nat inside source list&#8221; line so we can work out what you are allowing<br \/>\n<code><br \/>\nshow run | inc ip nat<br \/>\nip nat inside source list 1 interface Dialer0 overload<\/p>\n<p>show ip access-list 1<br \/>\n 10 access-list 1 permit 172.17.0.0 0.0.255.255<br \/>\n<\/code><br \/>\nNow in my case I&#8217;ve got a standard list, allowing PPTP through it, we need to create and change to an extended list.  So I will use 190 for NVI, and you need a second one too for Traditional, so I&#8217;ll use 191.<\/p>\n<p>What we need to do is block PPTP traffic in the NVI NAT list, but then allow internal IP&#8217;s out.  So something like<br \/>\n<code><br \/>\nip access-list extended 190<br \/>\n 10 deny tcp any any eq 1723<br \/>\n 20 deny gre any any<br \/>\n 30 permit 172.17.0.0 0.0.255.255<br \/>\nip access-list extended 191<br \/>\n 10 permit tcp 172.17.0.0 0.0.255.255 any eq 1723<br \/>\n 20 permit gre 172.17.0.0 0.0.255.255 any<br \/>\n 30 deny ip any any<br \/>\n<\/code><br \/>\nSo this has the setup ready to apply the final commands, this will put NVI NAT as the default and force port 1723 and GRE traffic to use traditional NAT<br \/>\n<code><br \/>\nip nat source list 190 interface Dialer0 overload<br \/>\nno ip nat inside source list 1 interface Dialer0 overload<br \/>\nip nat inside source list 191 interface Dialer0 overload<br \/>\n<\/code><br \/>\nin this order you should only lose a few packet of data to the internet, though if you get a few errors like<br \/>\n<code><br \/>\nDynamic mapping in use, do you want to delete all entries? [no]: yes<br \/>\n%Error: Dynamic mapping still in use, cannot remove<br \/>\n<\/code><br \/>\nYou can &#8220;clear ip nat trans *&#8221; and try again.  Sometimes it takes a minute or two so you can try again then, otherwise removing the &#8220;ip nat inside\/outside&#8221; command helps clear to issue, though this will increase down time.  Another guarantee method is to shut the external interface, that works every time \ud83d\ude42<\/p>\n<p>So try you PPTP VPN connection now and you should be away.<\/p>\n<p>Now I did say that this site has not services, but just to take this post all the way, if your doing these change to a major site then you would want to adjust your inbound port forwards, you simple want to remove the inside bit<br \/>\n<code><br \/>\nno ip nat inside source static tcp 172.17.2.25 80 interface Dialer0 80<br \/>\nno ip nat inside source static tcp 172.17.2.25 25 interface Dialer0 25<br \/>\nno ip nat inside source static tcp 172.17.2.25 21 interface Dialer0 21<br \/>\nip nat source static tcp 172.17.2.25 80 interface Dialer0 80<br \/>\nip nat source static tcp 172.17.2.25 25 interface Dialer0 25<br \/>\nip nat source static tcp 172.17.2.25 21 interface Dialer0 21<br \/>\n<\/code><br \/>\nJust don&#8217;t change the PPTP port in, that need Traditional NAT<br \/>\n<code><br \/>\nip nat inside source static tcp 172.17.2.26 1723 interface Dialer0 1723<br \/>\n<\/code><br \/>\nThese changes should then allow you to use the routers external IP address to be NAT hair pin back to the local services.<\/p>\n<p>Hrmm, just found out my VoIP service isn&#8217;t working through this change so, standby for more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Howdy all, it&#8217;s been a while but I found this and figured it was well worth sharing. I can&#8217;t say I found the answer to this issue online, and once I got it it seemed easy which might be why. To explain the title further, this is a home or small branch office internet connection &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/www.lanchbury.au\/?p=396\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[12],"tags":[],"class_list":["post-396","post","type-post","status-publish","format-standard","hentry","category-how-to","item-wrap"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7tC7P-6o","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=396"}],"version-history":[{"count":6,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/396\/revisions"}],"predecessor-version":[{"id":402,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/396\/revisions\/402"}],"wp:attachment":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}