IPv4 Security Issues
The IPv4 protocol had no built-in security. Typical problems are IP spoofing, ICMP abuse (ping floods and redirects), fragmentation attacks, smurf and amplification attacks, and sniffing of unencrypted packets. Network address translation (NAT) hides internal addresses but is not a security feature. Protection comes from IPsec, firewalls and filtering.
IPsec
IPsec secures communication at the network layer. AH (Authentication Header) gives integrity and source authentication but no encryption; ESP (Encapsulating Security Payload) gives confidentiality, integrity and authentication. In transport mode only the payload is protected (host to host); in tunnel mode the whole original packet is wrapped in a new one (used for VPNs). The Security Association (SA) holds the agreed algorithms and keys, and IKE (Internet Key Exchange) sets it up.
IPv6 Security
IPv6 uses 128-bit addresses and was designed with IPsec support (now recommended, not mandatory). Its security issues include Neighbour Discovery attacks (spoofed neighbour or router advertisements, the IPv6 form of ARP spoofing), extension header abuse, tunnelling transition mechanisms that bypass controls, and the complexity of dual-stack networks, where IPv4 and IPv6 both run and rules must cover both. A huge address space makes random scanning much harder, but attackers still use predictable addresses and DNS. Firewalls and monitoring must be configured for IPv6 explicitly.
Public Key Infrastructure (PKI)
Public-key cryptography needs a way to trust that a public key belongs to the claimed owner. A PKI provides this through digital certificates.
- A certificate (X.509) binds a public key to an identity (such as a domain name) and is signed by a certificate authority (CA). It contains the subject, public key, issuer, validity dates, serial number and signature.
- A certificate authority issues and signs certificates after verifying the requester; a registration authority may do the checking.
- Chain of trust: a server certificate is signed by an intermediate CA, which is signed by a root CA whose certificate is already trusted by the browser or operating system (root store).
- Revocation: a certificate can be cancelled before expiry (key leak) through a CRL (certificate revocation list) or OCSP (online status check).
- Certificates expire, so they must be renewed on time.
Definition: Digital certificate. An electronic document that binds a public key to the identity of its owner and is signed by a trusted certificate authority, so that others can trust the key.
Table 3.5: IPsec protocols
| Item | Function | Note |
|---|---|---|
| AH | Integrity and authentication | No encryption |
| ESP | Encryption, integrity, authentication | Most used |
| Transport mode | Protects payload only | Host to host |
| Tunnel mode | Protects the whole packet | Used in VPNs |
Example 3.5: Validating a certificate chain
Problem: A server presents the certificate for shop.example, signed by Issuing CA, which is signed by Root CA. The browser trusts only Root CA. The certificate is valid until 15 January 2027. Check the chain and find the days left on 26 November 2026.
Solution:
- The server certificate names Issuing CA as issuer; Issuing CA's certificate names Root CA as issuer.
- Root CA is in the trusted store, so the chain ends in a trusted root: the chain is valid.
- Days left = from 26 November 2026 to 15 January 2027 = 4 (to 30 Nov) + 31 (Dec) + 15 (Jan) = 50 days.
- The browser must also check that the certificate has not been revoked and that the name matches.
Result: The chain is trusted and the certificate has 50 days left, so it is time to plan renewal.
import datetime
issuer = {"shop.example": "Issuing CA", "Issuing CA": "Root CA",
"Root CA": "Root CA"}
trusted = {"Root CA"}
name, chain = "shop.example", ["shop.example"]
while issuer[name] != name:
name = issuer[name]
chain.append(name)
print(" -> ".join(chain))
print("Trusted root:", chain[-1] in trusted)
left = datetime.date(2027, 1, 15) - datetime.date(2026, 11, 26)
print("Days left:", left.days)
Output
shop.example -> Issuing CA -> Root CA
Trusted root: True
Days left: 50
Common mistakes
- Treating NAT as if it were a firewall.
- Forgetting to apply firewall rules to IPv6 when IPv4 is protected.
- Letting certificates expire.
- Installing unknown root certificates in the trusted store.
Key takeaways
- IPv4 has no built-in security; IPsec gives AH and ESP in transport or tunnel mode.
- IPv6 supports IPsec; watch Neighbour Discovery attacks and dual-stack gaps.
- PKI: certificate, CA, chain of trust, CRL and OCSP.
- A certificate binds a public key to an identity.
Practice questions
- What is the difference between AH and ESP?
- What is a certificate authority?
- How are certificates revoked?
Answers to the practice questions
- AH gives integrity and authentication only; ESP also gives encryption.
- A trusted body that verifies identities and signs digital certificates.
- Through a CRL or an OCSP check.
Sources
- Official BCA syllabus Computer Security, course code 25BCA406DS02, Unit III
