Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with pix501 1

Status
Not open for further replies.

turalo

IS-IT--Management
Feb 20, 2007
41
NL
I need help configuring incoming connections on my pix501 firewall,
the firewall is now set as defoult, I can use the internet.
outside interface is static :
IP: 192.168.1.17
msk: 255.255.255.0
gate: 192.168.1.254

inside is dhcp enabled :
IP : 192.168.0.1
msk: 255.255.255.0
gate: 192.168.0.1

Now normal outbound internet traffic works well, what I want to do is to make possible for some service like for example VNC (port 5900) to be able to get in, so IF I want to login to a pc behind pix501 from another location with vnc.
I have a pc connected on this firewall with IP : 192.168.0.2
please can sombody help me set this.
I'm stock alredy 2 days, cant understand how does it works.
I have also PDM interface available and also connection on console.
please help.
 

Build Access List to allow the traffic in -
access-list outside_access_in permit tcp any host interface outside eq 5900

Apply the ACL to the outside interface -
access-group outside_access_in in interface outside

Map incoming port to an IP and port on the inside (one line for each port)-
static (inside,outside) tcp interface 5900 192.168.0.2 5900 netmask 255.255.255.255


Brent
Systems Engineer / Consultant
CCNP, CCSP
 
When I type in that command I get error, that this is unknow command.

access-list outside_access_in permit tcp any host interface outside eq 5900

 
What pix os version do you have running?

If it is an older version, you can replace "interface outside" with
"host 192.168.1.17"


Brent
Systems Engineer / Consultant
CCNP, CCSP
 
this is the newest version, I just got it new in box.
its very strange...

 
its very strange, When I'm in the acces list interface (pix device manager java interface) I try to add a new rule, in the rule I can selec
permit : yes/no

host : inside / outside
destination : inside / outside
logging : yes/no
ports : any/others
description

first I select "permit"
than first colom from left I select
"outside" 192.168.1.17 255.255.255.0 (also tryd other msks)
than colom from right
"inside" 192.168.0.2 255.255.255.0
than I select ports : 5900
and give a description that this is vncblabla.
when I click OK button it says that the host is not in hosts list do you want to add it now IF you say cancel it does doe notthing, so I click yes, than it asks me "host dynamic IP or static" it takes dynamyc by defoult so I tryd dynamic and also static, in any way it creates some host in hosts table, and also adds a rule to translations table, after this, I do apply , well thats it, by now I'm loosing the iternet connection, and the port 5900 is not accesible from outside. so or I do not understand the logica or something is going wrong. I alredy reset the firewall many times to make sure that no wrong setting is saved. still same problem.
please help.
 
Any suggestions ???

I'm still not coming true, still cannot make it work :-(
 
Sorry I don't use the PDM except for the graphs.

Post a config from the command line and we'll take a look


Brent
Systems Engineer / Consultant
CCNP, CCSP
 
it sounds like you are creating a static that overrides you global/nat statements. I suggest that you learn the pix thru terminal and use pdm for graph and so. Imo the pdm just messes things up ( think it sucks )

either post your config or have a look here

 
Well I got that feeling to that pdm messes things up, but cause I'm new to this device I just tryd to find a way to use it, and actualy now I cannot even open pdm anymore, I reset everything from the shell with factory def command, and after I gived the inside outside info and also location of pdm and dhcp for inside, but cannot get any pdm anymore, and cannot connect to internet,even after setting defoult route to. I also like the shell more, but I didnot understand the copleet picture of this device.

right now this device is set to factory defoults, I need help doing next things:

1. setting the outside to use specific IP/mask/dns (no dhcp)
2. setting inside to use dhcp or specified ip/mask/dns
3. making sure that internet is accesable
4. making sure that some ip's from outside can acces some host's inside on speciefied port's.
5. that all traffic from inside to outside is permitted.
6. that specified IP can login to pix from outside to config it.

I know how to make 1 and 2
I think the 3 will also work, but the 4,5,6 I need help with, please help me if you can.
in advance maybe I can help you with something.
I just need tu understand the logica. and get few examples.
pls help.
thanks.
 
my link explains it all. So by looking at the configuration examples you will be able to do it all.




 
Minimum Base:
hostname [HOSTNAME]
domain-name [DOMAIN.com]
ip address inside [INTERNAL_IP] [INTERNAL_SUBNET]
ip address outside [EXTERNAL_IP] [EXTERNAL_SUBNET]
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 [DEFAULT_GATEWAY]

DHCP SERVER:
dhcpd address [INTERNAL_IP_START]-[INTERNAL_IP_END] inside
dhcpd dns [DNS_IP#1] [DNS_IP#2]
dhcpd wins [WINS_IP#1]
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd auto_config outside
dhcpd enable inside

SSH:
ssh 0.0.0.0 0.0.0.0 outside ****You can change this to a specific IP for SSH access from outside
ssh [INTERNAL_IP] [INTERNAL_SUBNET] inside
passwd [TELNET/SSH_PASSWORD]

External Access Inbound:
Build Access List to allow the traffic in (one line for each port)-
access-list outside_access_in permit [TCP/UDP] any host [ExternalIP] eq [Port#]

Apply the ACL to the outside interface -
access-group outside_access_in in interface outside

Map incoming port to an IP and port on the inside (one line for each port)-
static (inside,outside) [TCP/UDP] [ExternalIP] [Port#] [InteralIP] [Port#] netmask 255.255.255.255


Anything in brackets needs to be replaced for your specific config. Bold means you have to enter a value (either a port # or IP address)




Brent
Systems Engineer / Consultant
CCNP, CCSP
 
Ok for the first time I start to understand it lil bit and also the commands didnot give any error, I needed to remove [] but still loging in true vnc (5900) from given host outside is not possible, so let me play around with this, and come back. thanks thanks thanks for now...
 
:( I'm still nowhere, I have the cisco device now working, can acces the internet, but nobody can acces my pc on specified port from outside.

this is what I did.

1: setting folowing settings



hostname pix

domain-name ew

ip address inside 192.168.2.1 255.255.255.0

ip address outside 192.168.1.17 255.255.255.0

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 192.168.1.254


dhcpd address 192.168.2.2-192.168.2.10 inside

dhcpd dns 192.168.1.254

dhcpd enable inside

ssh 192.168.1.20 255.255.255.0

ssh 192.168.2.2 255.255.255.0 inside

passwd 12345678

access-list outside_access_in permit tcp any host 192.168.1.20 eq 5900

access-group outside_access_in in interface outside

static (inside,outside) tcp 192.168.1.20 5900 192.168.2.2 5900 netmask 255.255.255.255

Here some info from show:

"" pixtest(config)# show route
outside 0.0.0.0 0.0.0.0 192.168.1.254 1 OTHER static
outside 192.168.1.0 255.255.255.0 192.168.1.17 1 CONNECT static
inside 192.168.2.0 255.255.255.0 192.168.2.1 1 CONNECT static
pixtest(config)# ""

""pixtest(config)# show access-list
access-list cached ACL log flows: total 0, denied 0 (deny-flow-max 256)
alert-interval 300
access-list outside_access_in; 2 elements
access-list outside_access_in line 1 permit tcp any host 192.168.1.20 eq 5900 (hitcnt=0)
access-list outside_access_in line 2 permit tcp any host 192.168.1.20 eq 5800 (hitcnt=0)
pixtest(config)# ""

""pixtest(config)# show dhcpd
dhcpd address 192.168.2.2-192.168.2.10 inside
dhcpd dns 192.168.1.254
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd enable inside
pixtest(config)# ""


""pixtest(config)# show ip
System IP Addresses:
ip address outside 192.168.1.17 255.255.255.0
ip address inside 192.168.2.1 255.255.255.0
Current IP Addresses:
ip address outside 192.168.1.17 255.255.255.0
ip address inside 192.168.2.1 255.255.255.0
pixtest(config)# ""



"" pixtest(config)# show nat
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
pixtest(config)# ""


"" pixtest(config)# show access-group
access-group outside_access_in in interface outside
pixtest(config)# ""



I was tryng to make sure that computer with IP : 192.168.1.20(outside) can acces my pc with vnc on port 5900, my pc has ip : 192.168.2.2 inside,
and shh , but does not work too, not from inside not form outside...
what do I do wrong ???
and pdm is not working anymore.



pixtest(config)# show config
: Saved
: Written by enable_15 at 11:49:02.670 UTC Fri Mar 2 2007
PIX Version 6.3(5)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd Vyg.xxxxxxxxxx encrypted
hostname pixtest
domain-name ew
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
access-list outside_access_in permit tcp any host 192.168.1.20 eq 5900
access-list outside_access_in permit tcp any host 192.168.1.20 eq 5800
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside 192.168.1.17 255.255.255.0
ip address inside 192.168.2.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm location 192.168.2.2 255.255.255.255 inside
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
static (inside,outside) tcp 192.168.1.20 5900 192.168.2.2 5900 netmask 255.255.255.255 0 0
static (inside,outside) tcp 192.168.1.20 5800 192.168.2.2 5800 netmask 255.255.255.255 0 0
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 192.168.1.254 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 sip-disconnect 0:02:00 sip-invite 0:03: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.2.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 timeout 5
ssh 192.168.1.0 255.255.255.0 outside
ssh 192.168.1.0 255.255.255.0 inside
ssh 192.168.2.0 255.255.255.0 inside
ssh timeout 5
console timeout 0
dhcpd address 192.168.2.2-192.168.2.10 inside
dhcpd dns 192.168.1.254
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd enable inside
terminal width 80
Cryptochecksum:xxxxxxxxxxxxx
 

Change 192.168.1.20 to the external IP address of your pix.
access-list outside_access_in permit tcp any host 192.168.1.17 eq 5900
access-list outside_access_in permit tcp any host 192.168.1.17 eq 5800
static (inside,outside) tcp 192.168.1.17 5900 192.168.2.2 5900 netmask 255.255.255.255 0 0
static (inside,outside) tcp 192.168.1.17 5800 192.168.2.2 5800 netmask 255.255.255.255 0 0

They way you had it setup was two conflicting IPs - the outside computer and the IP address the PIX was listening on.

For SSH and HTTPS connections you have to create the self signed certificate.

ca generate rsa key 1024
ca save all
ssh [INTERNAL_IP] [INTERNAL_SUBNET] inside


Brent
Systems Engineer / Consultant
CCNP, CCSP
 
ok this works :), thaks to you, now I'm going to try to understand it, and play with this lillbit, and see if I can get the PDM back, cause its not accessable anymore.

thanks for now.
 
This works, but now comes the 2 question, why others can acces my pc on that port to? I mean my intention was that only the pc : 192.168.1.20 gets acces to my pc 192.168.2.2 on port 5900, but now other pc's can also acces that port on my pc.
so that mean if I open that port for 1 IP other ip's can also acces it by same port ?
 
O yeah, I forgot, I didnot set any password for ssh, now when I get acces to it it asks for password.
 
your access list need to be reconfigured.

access-list outside_access_in permit tcp host 192.168.1.17 host 192.168.2.2 eq 5900

And rebind the access-group command after that

THe syntax is always source --> destination
 
Actually, the access list needs to be altered.
192.168.1.17 is the external address of the pix (the destination), the source is the originator of the request - 192.168.1.20 in this scenario. 192.168.2.2 is the internal natted address.

This will tighten access like you want.
access-list outside_access_in permit tcp host 192.168.1.20 host 192.168.1.17 eq 5900
access-list outside_access_in permit tcp host 192.168.1.20 host 192.168.1.17 eq 5800

For SSH, you will need to set the enable password and a telnet password as well as config the certificate. They seem to already be set by your posted config. When you SSH (version 1) to the pix, the first combination is
username: pix
password: the telnet password

Then once you are in you change to enable mode.


Brent
Systems Engineer / Consultant
CCNP, CCSP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top