Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


SSH Port forward from a specific IP

Posted on 2007-12-06
Medium Priority
Last Modified: 2010-04-21
Ok I read thru the other port forward questions and they didn't really help me. What I want to do is allow SSH thru the PIX. I only want the SSH session to be able to come from one static IP address. I want this SSH to point to one specific machine on my internal network. Here is a show run from the pix. Its pretty default. My son has played with it so his X-Box will work. If you have a suggestion I am more than willing to give it a try. Thanks in Advance


home-firewall# sho run
: Saved
PIX Version 6.3(4)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password xxxxxxxx encrypted
passwd xxxxxxxxx encrypted
hostname home-firewall
domain-name xxx.com
clock timezone EST -5
clock summer-time EDT recurring
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
object-group service XBLTCP tcp
  description Needed to make X-Box Live work
  port-object range 3074 3074
object-group service XBL-UDP udp
  description This it to make X-Box Work
  port-object range 3074 3074
  port-object range 88 88
object-group service NWN2 udp
  description allows me to host
  port-object range 5121 5121
access-list MY_INBOUND permit tcp any interface outside eq ssh
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside xx.xx.xx.xx
ip address inside
ip audit info action alarm
ip audit attack action alarm
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0 0
route outside xx.xx.xx.1 1
route inside xx.xx.xx.1 1
timeout xlate 0:05:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
http server enable
http inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
telnet inside
telnet timeout 5
ssh inside
ssh timeout 5
console timeout 0
dhcpd address inside
dhcpd dns xx.xx.xx.xx xx.xx.xx.xx
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd domain xxxxr.com
dhcpd auto_config outside
dhcpd enable inside
username xxxx password xxxxxxxx encrypted privilege 15
terminal width 80
Question by:psd_steve
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 28

Accepted Solution

batry_boy earned 2000 total points
ID: 20425369
Assuming the following value:

x.x.x.x = inside IP address of machine you want to allow SSH to
y.y.y.y = external IP address you wish to allow inbound SSH from

Put in these commands:

static (inside,outside) tcp interface ssh x.x.x.x ssh netmask
access-list outside_access_in permit tcp host y.y.y.y interface outside eq ssh
access-group outside_access_in in interface outside

That should do it...

Author Comment

ID: 20425411
Ok, it seemed to work like a charm. I have a follow up question however. How would I add an additional host? Just redo:

access-list outside_access_in permit tcp host y.y.y.y interface outside eq ssh

with the additional IP address? or do I need to do the entire thing over and create a new access list?

Also in my screwing around, I seem to have added:

access-list MY_INBOUND permit tcp any interface outside eq ssh

to my PIX. How do I delete this line from memory?
LVL 28

Expert Comment

ID: 20425429
>>Just redo:

access-list outside_access_in permit tcp host y.y.y.y interface outside eq ssh

with the additional IP address?

Yes, that is correct.  You can only have one access list applied to an interface in the same direction at a time, so you wouldn't be able to create a new access list and apply it in the same way.  Therefore you have to add another line to the same access list that references the additional source IP address.

>>access-list MY_INBOUND permit tcp any interface outside eq ssh

How do I delete this line from memory?

Enter the following command to delete that line:

no access-list MY_INBOUND permit tcp any interface outside eq ssh

You just put a "no" in front of the entire command it negates (deletes) the command.  This is true for nearly all the configuration commands on a PIX.

Hope this helps...

Author Closing Comment

ID: 31413335
Well deserved Wizard, more like a Guru to me! Thanks for the quick help

LVL 28

Expert Comment

ID: 20425458
Glad to help!

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (http://www.concertocloud.com/about/in-the-news/2017/02/0…
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question