Category Archives: iOS

Cisco Transparent firewall

Setting up a transparent firewall is very easy. just follow the steps below and you’re all set!

 

  1. Login to the ASA appliance.
  2. enable
  3. config t
  4. firewall transparent
  5. show firewall (check if it has been set.)
  6. interface ethernet 0/0 (set first ethernet port)
  7. switchport access vlan 2 ( set it to vlan 2)
  8. no shut (prevent it from shutting down)
  9. interface ethernet 0/1 (set first ethernet port)
  10. switchport access vlan 1 ( set it to vlan 1)
  11. no shut (prevent it from shutting down)
  12. interface  vlan 2
  13. nameif outside (name interface vlan 2 to outside – INFO: Security level for “outside” set to 0 by default.)
  14. interface  vlan 1
  15. nameif inside (name interface vlan 1 to inside – INFO: Security level for “inside” set to 100 by default.)
  16. http server enable (enable http server for asdm – optional)
  17. http 192.168.70.0 255.255.255.0 inside (set access list for http server)
  18. asdm image flash:/asdm-621.bin (load asdm image – optional)

Dismiss Keyboard on enter

It’s a common thing in iOS to hide the keyboard on a enter press when filling in some text fields. This is easily accomplished by adding the following code snippet to you’re project.

 

First add the UITextFieldDelegate to your controller view.

@interface myViewController : UIViewController  <UITextFieldDelegate>

 

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
    if([string isEqualToString: @"\n"]){
        [textField resignFirstResponder];
    }
    return YES;
}