05-21-2013 03:46 AM - edited 03-11-2019 06:46 PM
hi,
I have Pix firewall 515e on inside interface its has configured with IP 192.168.0.254.And Global Nating is configured.
global (outside) 1 interface
nat (inside) 1 192.168.0.0 255.255.255.0 0 0
I want i configured Global nating only for only specific IP address E.g 192.168.0.0-192.168.0.30 and 192.168.0.200-192.168.0.254
How i do this??
Solved! Go to Solution.
05-21-2013 05:57 AM
Hi,
Inbound and Outbound traffic can be controlled in the interface ACL by choosing the direction "in" or "out"
Inbound means traffic coming towards the interface
Outbound means traffic going out/heading out the interface
Here is a simple picture that should clarify this (click on the picture to enlarge)
So if you want to control traffic towards any remote network on the "inside" interface then you use an INBOUND ACL on the interface "inside". As you can see if your PC would be connecting to the Internet then the PIX would consider that INBOUND traffic on its "inside" interface.
Same goes for "outside". You control traffic coming from networks behind "outside" interface with an INBOUND ACL on the "outside" interface.
You very rarely need to use OUTBOUND ACL or atleast I have very rarely seem them being used.
Please, Remember to mark if you have found the replys to be correct answer to your question and/or rate answers using the starts at the bottom of the reply.
Hope this helps
- Jouni
05-21-2013 04:00 AM
Hi,
This would be so much easier on the new firewall software
I guess you could try
global (outside) 1 interface
nat (inside) 1 192.168.0.0 255.255.255.224
nat (inside) 1 192.168.0.200 255.255.255.248
nat (inside) 1 192.168.0.208 255.255.255.248
nat (inside) 1 192.168.0.216 255.255.255.248
nat (inside) 1 192.168.0.224 255.255.255.224
Though if your objective is to block Internet traffic from the other users then I would use ACL and not configure NAT in a more complicated way
Remember to mark the reply as the correct answer if it answered your question.
Hope this helps
- Jouni
05-21-2013 04:09 AM
Hi,
Can you please explain this i can't understand Its subnet is totally changed (nat (inside) 1 192.168.0.0 255.255.255.224
)
can i do it like this
nat (inside) 1 192.168.0.0-30 255.255.255.0 0 0
nat (inside) 1 192.168.0.200.254 255.255.255.0 0 0
Please tell how i configured the ACL insted of NAT complications.
05-21-2013 04:14 AM
Hi,
You CANT define a range of addresses in the NAT configuration. In the newer softwares (that your PIX doesnt support) you could do this. But thats a whole other story.
The reason I use different subnet masks is that I define the IP addresses you want to NAT
nat (inside) 1 192.168.0.0 255.255.255.224 = 192.168.0.0 - .31
nat (inside) 1 192.168.0.200 255.255.255.248 = 192.168.0.200 - .207
nat (inside) 1 192.168.0.208 255.255.255.248 = 192.168.0.208 - .215
nat (inside) 1 192.168.0.216 255.255.255.248 = 192.168.0.216 - .223
nat (inside) 1 192.168.0.224 255.255.255.224 = 192.168.0.224 - .255
- Jouni
05-21-2013 04:17 AM
Hi
Thanks for explanation please tell me how i accomplish this with ACL.
05-21-2013 04:24 AM
Hi,
I guess in terms of how many lines of configurations is inserted with using either NAT or ACL to control Internet access the ACL amounts to some more.
And naturally I dont know your current configurations and ACL configurations so I can just suggest a simple one
object-group network ALLOWED-INTERNET
network-object 192.168.0.0 255.255.255.224
network-object 192.168.0.200 255.255.255.248
network-object 192.168.0.208 255.255.255.248
network-object 192.168.0.216 255.255.255.248
network-object 192.168.0.224 255.255.255.224
access-list INSIDE-IN remark Allow Internet for some users
access-list INSIDE-IN permit ip object-group ALLOWED-INTERNET any
access-list INSIDE-IN remark Deny all other users
access-list INSIDE-IN deny ip 192.168.0.0 255.255.255.0 any
access-group INSIDE-IN in interface inside
This would allow connections from the hosts/networks under the ALLOWED-INTERNET anywhere BUT it would BLOCK all others hosts traffic through the firewall
If you have some other interfaces like DMZs on the PIX then this ACL wont be the correct one and you will have to use a bit different one.
So I would suggest confirming that such an ACL doesnt break anything related to your whole setup (Since we have not seen the complete PIX configurations)
- Jouni
05-21-2013 04:32 AM
Hi
Here is my firewall configuration now suggest me.
: Saved
: Written by enable_15 at 13:16:38.987 PKT Thu Apr 11 2013
PIX Version 6.3(3)
interface ethernet0 auto
interface ethernet1 auto
nameif ethernet0 outside security0
nameif ethernet1 inside security100
hostname pixfirewall
clock timezone PKT 5
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
no fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list outside_int permit tcp any host 192.168.0.233 eq www
access-list outside_int permit tcp any host 192.168.0.233 eq 1024
access-list outside_int permit tcp any host 124.109.46.245 eq pop3
access-list outside_int permit tcp any host 124.109.46.245 eq www
access-list outside_int permit tcp any host 124.109.46.245 eq lotusnotes
access-list outside_int permit tcp any host 124.109.46.246 eq www
access-list outside_int permit tcp any host 124.109.46.246 eq 1532
access-list outside_int permit tcp any host 124.109.46.246 eq 1533
access-list outside_int permit tcp any host 124.109.46.248 eq ftp-data
access-list outside_int permit tcp any host 124.109.46.248 eq ftp
access-list outside_int permit tcp any host 124.109.46.248 eq 1433
access-list outside_int permit tcp any host 124.109.46.245 eq imap4
access-list outside_int permit tcp any host 124.109.46.250 eq www
access-list outside_int permit tcp any host 124.109.46.250 eq https
access-list outside_int permit tcp any host 124.109.46.246 eq lotusnotes
access-list outside_int permit tcp any host 124.109.46.246 eq smtp
access-list outside_int permit tcp any host 124.109.46.241 eq www
access-list outside_int permit tcp any host 124.109.46.249 eq 1533
access-list outside_int permit tcp any host 124.109.46.245 eq smtp
access-list outside_int permit tcp any host 124.109.46.246 eq https
access-list outside_int permit tcp any host 124.109.46.245 eq https
access-list 90 permit ip 192.168.0.0 255.255.255.0 192.168.2.0 255.255.255.0
access-list 90 permit ip 192.168.0.0 255.255.255.0 192.168.1.0 255.255.255.0
access-list 90 permit ip 192.168.0.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list 90 permit ip 192.168.0.0 255.255.255.0 192.168.3.0 255.255.255.0
access-list l_map permit ip 192.168.0.0 255.255.255.0 192.168.2.0 255.255.255.0
access-list l_map permit ip host *.*.*.* 192.168.2.0 255.255.255.0
access-list p_map permit ip 192.168.0.0 255.255.255.0 192.168.3.0 255.255.255.0
access-list p_map permit ip host
*.*.*.*
192.168.3.0 255.255.255.0
access-list 101 permit ip 192.168.0.0 255.255.255.0 any
access-list k_map permit ip 192.168.0.0 255.255.255.0 192.168.1.0 255.255.255.0
access-list k_map permit ip host
*.*.*.*
192.168.1.0 255.255.255.0
pager lines 24
logging on
logging timestamp
logging trap informational
logging host inside 192.168.0.173
mtu outside 1500
mtu inside 1500
ip address outside *.*.*.* 255.255.255.240
ip address inside 192.168.0.254 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool client_pool 192.168.10.1-192.168.10.254
pdm location 124.109.46.245 255.255.255.255 outside
pdm location 124.109.46.249 255.255.255.255 outside
pdm location 192.168.0.0 255.255.255.255 inside
pdm location 192.168.0.27 255.255.255.255 inside
pdm location 192.168.0.28 255.255.255.255 inside
pdm location 192.168.0.224 255.255.255.255 inside
pdm location 192.168.0.225 255.255.255.255 inside
pdm location 192.168.0.233 255.255.255.255 inside
pdm location 192.168.1.0 255.255.255.0 outside
pdm location 192.168.2.0 255.255.255.0 outside
pdm location 192.168.3.0 255.255.255.0 outside
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list 90
nat (inside) 1 192.168.0.0 255.255.255.0 0 0
static (inside,outside) *.*.*.* 192.168.0.224 dns netmask 255.255.255.255 0 0
static (inside,outside) *.*.*.* 192.168.0.225 dns netmask 255.255.255.255 0 0
static (inside,outside) *.*.*.* 192.168.0.28 netmask 255.255.255.255 0 0
static (inside,outside) *.*.*.* 192.168.0.27 netmask 255.255.255.255 0 0
static (inside,outside) *.*.*.* 192.168.0.16 netmask 255.255.255.255 0 0
access-group outside_int in interface outside
route outside 0.0.0.0 0.0.0.0 124.109.46.241 1
route outside 192.168.1.0 255.255.255.0 124.29.194.3 1
route outside 192.168.2.0 255.255.255.0 202.163.68.117 1
route outside 192.168.3.0 255.255.255.0 124.29.231.197 1
timeout xlate 0:15:00
timeout conn 0:20: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
tftp-server inside 192.168.0.173 /bk
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set tset esp-des esp-md5-hmac
crypto dynamic-map dmap 200 set transform-set tset
crypto map smap 6 ipsec-isakmp
crypto map smap 6 match address k_map
crypto map smap 6 set peer *.*.*.*
crypto map smap 6 set transform-set tset
crypto map smap 7 ipsec-isakmp
crypto map smap 7 match address lahore_map
crypto map smap 7 set peer *.*.*.*
crypto map smap 7 set transform-set tset
crypto map smap 8 ipsec-isakmp dynamic dmap
crypto map smap 9 ipsec-isakmp
crypto map smap 9 match address peshawar_map
crypto map smap 9 set peer *.*.*.*
crypto map smap 9 set transform-set tset
crypto map smap client configuration address respond
crypto map smap interface outside
isakmp enable outside
isakmp key ************ address *.*.*.* netmask 255.255.255.255
isakmp key ************* address *.*.*.* netmask 255.255.255.255
isakmp key ************** address 0.0.0.0 netmask 255.255.255.255
isakmp key *************** address *.*.*.* netmask 255.255.255.255
isakmp policy 10 authentication pre-share
isakmp policy 10 encryption des
isakmp policy 10 hash md5
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400
vpngroup vpnclient address-pool client_pool
vpngroup vpnclient split-tunnel 90
vpngroup vpnclient idle-time 1800
vpngroup client idle-time 1800
telnet 192.168.0.0 255.255.255.255 inside
telnet 192.168.0.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0
terminal width 80
Cryptochecksum:28c34496df8114513fb7f28110ed04fe
: end
05-21-2013 04:54 AM
Hi,
Seems to me that you would need the following
object-group network ALLOWED-INTERNET
network-object 192.168.0.0 255.255.255.224
network-object 192.168.0.200 255.255.255.248
network-object 192.168.0.208 255.255.255.248
network-object 192.168.0.216 255.255.255.248
network-object 192.168.0.224 255.255.255.224
access-list INSIDE-IN remark Allow traffic to remote sites
access-list INSIDE-IN permit ip 192.168.0.0 255.255.255.0 192.168.1.0 255.255.255.0
access-list INSIDE-IN permit ip 192.168.0.0 255.255.255.0 192.168.2.0 255.255.255.0
access-list INSIDE-IN permit ip 192.168.0.0 255.255.255.0 192.168.3.0 255.255.255.0
access-list INSIDE-IN permit ip 192.168.0.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list INSIDE-IN remark Allow Internet for some users
access-list INSIDE-IN permit ip object-group ALLOWED-INTERNET any
access-list INSIDE-IN remark Deny all other users
access-list INSIDE-IN deny ip 192.168.0.0 255.255.255.0 any
access-group INSIDE-IN in interface inside
Remember to mark the reply(s) as the correct answer if they answered your question.
Hope this helps
- Jouni
05-21-2013 05:00 AM
Hi
In above configuration you use access-group INSIDE-IN in interface inside where "in" mean inbound traffice.I am confused here if i am not wrong we controlling our outbound traffic.
It could be like this access-group INSIDE-IN out interface inside
05-21-2013 05:04 AM
Hi,
The direction "in" or "out" specifies the direction with regards to the interface in question.
So if we use the direction "in" here it means traffic coming towards "inside" interface and therefore heading out through the PIX.
If we used the direction "out" it would be controlling traffic/connections that were going out the interface "inside" and therefore towards the LAN network.
It goes by the same logic as your current "outside_int" ACL. You have attached it to the interface "outside" in the direction "in". Therefore it means it controls traffic coming from the network behind "outside" towards (and through) the PIX firewall.
- Jouni
05-21-2013 05:10 AM
Hi
okay please check below acl is correct.
access-group internet_control in interface inside
access-list internet_control permit IP 192.168.0.-30 0.0.0.255
access-list internet_control permit IP 192.168.200.-254 0.0.0.255
access-list internet_control deny IP any any.
05-21-2013 05:17 AM
Hi,
You CANT use any form of address ranges either on the ACLs or the NAT configurations on your software level.
Also you CANT use willcard masks on a Cisco firewall. Those are used on Routers but not firewalls
The configuration I provided should be the configuration you can use on your PIX firewall.
You will have to take into account that you have L2L VPN connections and VPN Client configurations on the PIX too and that traffic has to be allowed too or those stop working from your LAN to the remote site. That is why I had added some ACL rules on top of the ACL
So you should be ok with
object-group network ALLOWED-INTERNET
network-object 192.168.0.0 255.255.255.224
network-object 192.168.0.200 255.255.255.248
network-object 192.168.0.208 255.255.255.248
network-object 192.168.0.216 255.255.255.248
network-object 192.168.0.224 255.255.255.224
access-list INSIDE-IN remark Allow traffic to remote sites
access-list INSIDE-IN permit ip 192.168.0.0 255.255.255.0 192.168.1.0 255.255.255.0
access-list INSIDE-IN permit ip 192.168.0.0 255.255.255.0 192.168.2.0 255.255.255.0
access-list INSIDE-IN permit ip 192.168.0.0 255.255.255.0 192.168.3.0 255.255.255.0
access-list INSIDE-IN permit ip 192.168.0.0 255.255.255.0 192.168.10.0 255.255.255.0
access-list INSIDE-IN remark Allow Internet for some users
access-list INSIDE-IN permit ip object-group ALLOWED-INTERNET any
access-list INSIDE-IN remark Deny all other users
access-list INSIDE-IN deny ip 192.168.0.0 255.255.255.0 any
access-group INSIDE-IN in interface inside
It first allow traffic to all the VPN networks. It then allows all traffic from the selected hosts that you mentioned in your original post. It then BLOCKS ALL OTHER traffic from the "inside"
- Jouni
05-21-2013 05:35 AM
Hi,
Great thanks for Help.But jouni i am still struck in "IN" and "OUT" statements with respect to ACL.As far my understanding.
"IN" mean inbound traffic and "out" mean outbound traffic with respect to interface.
Mean when traffic going from our LAN to firewall inside interface we call it outbound traffic am i right??/
05-21-2013 05:57 AM
Hi,
Inbound and Outbound traffic can be controlled in the interface ACL by choosing the direction "in" or "out"
Inbound means traffic coming towards the interface
Outbound means traffic going out/heading out the interface
Here is a simple picture that should clarify this (click on the picture to enlarge)
So if you want to control traffic towards any remote network on the "inside" interface then you use an INBOUND ACL on the interface "inside". As you can see if your PC would be connecting to the Internet then the PIX would consider that INBOUND traffic on its "inside" interface.
Same goes for "outside". You control traffic coming from networks behind "outside" interface with an INBOUND ACL on the "outside" interface.
You very rarely need to use OUTBOUND ACL or atleast I have very rarely seem them being used.
Please, Remember to mark if you have found the replys to be correct answer to your question and/or rate answers using the starts at the bottom of the reply.
Hope this helps
- Jouni
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: