Solved

Cisco Pix config help

Posted on 2004-08-30
16
2,033 Views
Last Modified: 2013-11-16
I am rather new to Cisco PIX's and the configs. I know how to setup a default config and get internet.

I have read several manuals from Cisco and I cannot seem to pass stuff into the pix.

Here is my setup:
[example IP address]
network gateway : 1.1.1.1
public IP: 1.1.1.5
private ip range 192.168.0.1-245

I have the pix setup, but I need to to figure two things out: How to open a port for everyone to use (ie. 49001) and how to forward ports 80 and 25 internally to 192.168.0.240.

Here is my config:

PIX Version 6.3(1)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
hostname pixfirewall
domain-name ciscopix.com
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol ils 389
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
names
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside 1.1.1.5 255.255.255.240
ip address inside 192.168.0.50 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 1.1.1.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 RADIUS protocol radius
aaa-server LOCAL protocol local
http server enable
http 192.168.0.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 timeout 5
console timeout 0
terminal width 80



0
Comment
Question by:greenskwerl
  • 8
  • 5
  • 3
16 Comments
 
LVL 36

Assisted Solution

by:grblades
grblades earned 300 total points
ID: 11934278
Hi greenskwerl,
By default all traffic from inside to outside is permitted so users should be able to use port 49001 already.

To forward ports 80 and 25 to an internal machine use :-

access-list outside_in permit tcp any host 1.1.1.2 eq www
access-list outside_in permit tcp any host 1.1.1.2 eq smtp
access-group outside_in in interface outside
static (inside,outside) tcp 1.1.1.2 smtp 192.168.0.240 smtp netmask 255.255.255.255 0 0
static (inside,outside) tcp 1.1.1.2 www 192.168.0.240 www netmask 255.255.255.255 0 0

Basically the 'static' command maps the ports and you also need an access list to permit the traffic in.
0
 
LVL 36

Expert Comment

by:grblades
ID: 11934282
0
 

Author Comment

by:greenskwerl
ID: 11934386

=====================================================================
To forward ports 80 and 25 to an internal machine use :-

access-list outside_in permit tcp any host 1.1.1.2 eq www
access-list outside_in permit tcp any host 1.1.1.2 eq smtp
access-group outside_in in interface outside
static (inside,outside) tcp 1.1.1.2 smtp 192.168.0.240 smtp netmask 255.255.255.255 0 0
static (inside,outside) tcp 1.1.1.2 www 192.168.0.240 www netmask 255.255.255.255 0 0

=====================================================================

I am assuming you mean 1.1.1.5 instead of 1.1.1.2 for my public IP?
0
 

Author Comment

by:greenskwerl
ID: 11934595
Still not working. Here is my updated config


==========================================
PIX Version 6.3(1)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
hostname pixfirewall
domain-name ciscopix.com
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol ils 389
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
names
access-list outside_in permit tcp any host 1.1.1.5 eq www
access-list outside_in permit tcp any host 1.1.1.5 eq smtp
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside 1.1.1.5 255.255.255.240
ip address inside 192.168.0.50 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm location 192.168.0.240 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 1.1.1.5 smtp 192.168.0.240 smtp netmask 255.255.255.255 0 0
static (inside,outside) tcp 1.1.1.5 www 192.168.0.240 www netmask 255.255.255.255 0 0
access-group outside_in in interface outside
route outside 0.0.0.0 0.0.0.0 1.1.1.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 RADIUS protocol radius
aaa-server LOCAL protocol local
http server enable
http 192.168.0.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 timeout 5
console timeout 0
terminal width 80
0
 
LVL 79

Expert Comment

by:lrmoore
ID: 11934797
Can you post results of
show access-list

Can you verify that the default gateway of your server is set to 192.168.0.50  (PIX interface)?
0
 

Author Comment

by:greenskwerl
ID: 11934895
Access-list cached ACL log flows: total 0, denied 0 (deny-flow-max 256) alert-interval 300
           
access-list outside_in; 2 elements
access-list outside_in line 1 permit tcp any host 1.1.1.5 eq www (hitcnt=4)
access-list outside_in line 2 permit tcp any host 1.1.1.5 eq smtp (hitcnt=0)

Again,

my outside interface is 1.1.1.5, my inside interface 192.168.0.50, and my router gateway is 1.1.1.1
0
 
LVL 79

Accepted Solution

by:
lrmoore earned 200 total points
ID: 11935370
>access-list outside_in line 1 permit tcp any host 1.1.1.5 eq www (hitcnt=4)

The hit count = 4 means that inbound packets are getting in. The question is, will the server accept them, and is the SERVER's default gateway pointing back to the PIX?
0
 

Author Comment

by:greenskwerl
ID: 11935410
That was it. I dint realize the server had to have that ip as the gateway...

Thanks.

Is it possible to split points here?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 79

Expert Comment

by:lrmoore
ID: 11935458
Sure, there should be a link right above the comment block to split points...

0
 

Author Comment

by:greenskwerl
ID: 11935530
I am assuming I could also add the following if I wanted to open port 49001

access-list outside_in permit tcp any host 1.1.1.5 eq 49001
static (inside,outside) tcp 1.1.1.2 49001 192.168.0.240 49001 netmask 255.255.255.255 0 0
0
 
LVL 36

Expert Comment

by:grblades
ID: 11935602
I mentioned the IP address 1.1.1.2 before as you seem to have this IP address spare so it is normally a better idea to use it.

The additional commands you gave are correct apart from the typo copying the IP address.
access-list outside_in permit tcp any host 1.1.1.5 eq 49001
static (inside,outside) tcp 1.1.1.5 49001 192.168.0.240 49001 netmask 255.255.255.255 0 0

0
 

Author Comment

by:greenskwerl
ID: 11943737
What if I setup a service-group called 'test' with ports 50000 through 50010

Could I do the following:


access-list outside_In permit tcp any object-group test any any Object-group test
static (inside,outside) tcp 1.1.1.5 test 192.168.0.240 test netmask 255.255.255.255 0 0
0
 
LVL 79

Expert Comment

by:lrmoore
ID: 11944825
Unfortunately, no.
It works in the access-list, but your static will fail on "test" because it is not a well-known tcp service like www.

You would have to have multiple statics:

static (inside,outside) tcp 1.1.1.5 50000 192.168.0.240 50000 netmask 255.255.255.255 0 0
static (inside,outside) tcp 1.1.1.5 50001 192.168.0.240 50001 netmask 255.255.255.255 0 0
static (inside,outside) tcp 1.1.1.5 50002 192.168.0.240 50002 netmask 255.255.255.255 0 0
static (inside,outside) tcp 1.1.1.5 50003 192.168.0.240 50003 netmask 255.255.255.255 0 0
<etc>

0
 

Author Comment

by:greenskwerl
ID: 11944879
ok. Thanks. That sucks though, especially if you need to open alot of ports.
0
 
LVL 79

Expert Comment

by:lrmoore
ID: 11944951
That's life in the fast lane.....

If you have another public IP address available to you, you can do 1-1 nat, then use the object groups to have a very tight config:

access-list outside_In permit tcp any object-group test any host 1.1.1.6 Object-group test
static (inside,outside) 1.1.1.6 192.168.0.240 netmask 255.255.255.255 0 0

0
 

Author Comment

by:greenskwerl
ID: 11944992
Ok. Thanks for all of your help
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

From Cisco ASA version 8.3, the Network Address Translation (NAT) configuration has been completely redesigned and it may be helpful to have the syntax configuration for both at a glance. You may as well want to read official Cisco published AS…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now