?
Solved

SSH Port forward from a specific IP

Posted on 2007-12-06
5
Medium Priority
?
605 Views
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

Steve

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
names
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 255.255.255.0
ip address inside 192.168.200.1 255.255.255.0
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.0.0 0.0.0.0 0 0
route outside 0.0.0.0 0.0.0.0 xx.xx.xx.1 1
route inside 192.168.200.1 255.255.255.255 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 192.168.200.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
telnet 192.168.200.0 255.255.255.0 inside
telnet timeout 5
ssh 192.168.200.0 255.255.255.0 inside
ssh timeout 5
console timeout 0
dhcpd address 192.168.200.150-192.168.200.200 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
Cryptochecksum:xxxxxxx
0
Comment
Question by:psd_steve
  • 3
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
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 255.255.255.255
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...
0
 

Author Comment

by:psd_steve
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?
0
 
LVL 28

Expert Comment

by:batry_boy
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...
0
 

Author Closing Comment

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

Steve
0
 
LVL 28

Expert Comment

by:batry_boy
ID: 20425458
Glad to help!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

For months I had no idea how to 'discover' the IP address of the other end of a link (without asking someone who knows), and it drove me batty. Think about it. You can't use Cisco Discovery Protocol (CDP) because it's not implemented on the ASAs.…
When speed and performance are vital to revenue, companies must have complete confidence in their cloud environment.
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 …
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…

807 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