Home > Security Tips > Network Security Tactics > Using your firewall to transparently proxy protocols
Security Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

NETWORK SECURITY TACTICS

Using your firewall to transparently proxy protocols


Kurt Seifried
05.21.2002
Rating: -4.40- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   




Many sites wish to enforce certain security policies on network traffic. This can range from "scan all inbound POP traffic for viruses" to "block HTTP requests to this list of servers" or "strip header information from all outgoing e-mail." Unfortunately, this can be difficult to impossible for administrators to manage. Often times, control of the desktops and network itself is fragmented, as roaming users require special configuration. One solution to this is to enforce policy at the network gateways, typically in the form of "edge" routers and firewalls.

The advantage to transparently intercepting and managing network traffic to and from clients is that the client does not need any special software or configuration to make it work. This means that roaming users will not be adversely affected by strange settings and newly installed desktops cannot accidentally circumvent security policy due to a lack of software or configuration. Additionally, this centralizes policy management and administration functions, and the system can be designed to fail "closed" rather then failing open (designing fail "closed" systems when multiple desktops are involved is a non trivial task).

The first step is to configure your firewall or router. For example, with a Cisco router (running IOS 11.1 or later) you first create a route to the proxy, then an access list to trap the traffic you wish to intercept (e.g. HTTP) and finally a policy that directs all that traffic to the proxy.

!
route-map proxy-redirect permit 10
 match ip address 110
  set ip next-hop 1.2.3.4
!

!
access-list 110 deny tcp any any neq www
access-list 110 deny tcp host 1 2 3.4 any
access-list 110 permit tcp any any
!

!
interface Ethernet0
 ip policy route-map proxy-redirect
!

On a Linux system with IPTables, and the proxy software installed locally you would simply need:

iptables -A PREROUTING -s 10.0.0.0/255.255.255.0 -p tcp -m tcp --dport 80 -j 
REDIRECT --to-ports 3128

Or if the proxy is on a different system:

iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0  -j DNAT --to 
1.2.3.4:3128

As you can see, it is quite trivial to redirect any network traffic from TCP and UDP to ICMP and IGMP. The main issue that can arise with transparent proxying has to do with applications capable of handling the traffic properly, especially if authentication is involved. For HTTP there are a number of proxies, some popular ones being Apache, Squid and Cisco. Since the Web is largely stateless, it is much easier to transparently proxy connections. For protocols such as SMTP, most normal cases can be handled by a server such as Postfix with relaying allowed from internal hosts. However, with features such as SMTP-AUTH and SMTP-TLS in use, proxying can break, and there is no way to differentiate between "normal" SMTP traffic and SMTP traffic using SMTP-AUTH on most firewalls or routers.

The current bottleneck with transparently proxying most protocols is not the firewall or the router, but instead the lack of a good application-level proxying software, with the primary problem being support for authentication protocols. Fortunately, more products -- especially antivirus-scanning products -- are starting to support transparent proxying more effectively. Other uses of transparent proxying include forcing unencrypted data over encrypted links or VPNs or allowing the use of rate-limiting software to prevent applications such as peer-to-peer clients from taking up too much bandwidth or shunting the traffic to less important network links.

About the author
Kurt Seifried is a network security administrator. Visit his Web site at http://seifried.org/security/


Rate this Tip
To rate tips, you must be a member of SearchSecurity.com.
Register now to start rating these tips. Log in if you are already a member.




BROWSE BY TAG
Infrastructure and Network Security,   Network Security: Tools, Products, Software,   Network Firewalls, Routers and Switches,   Enterprise Network Security,   Network Security Tactics,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Infrastructure and Network Security
VPNs: IPsec vs. SSL
Sensitive student data cracked at U. of Georgia
Microsoft patches IE spoofing problem
IE update clears up spoofing issue
Geer slams Windows dominance, calls for government intervention
Countdown begins for Mydoom DDoS attacks
Microsoft to disable spoofing syntax in IE
Mydoom variant targets security features, Microsoft
IE flaw could fool users in illicit downloads
Hackers scanning for ports opened by Mydoom

Network Firewalls, Routers and Switches
How to prepare for a secure network hardware upgrade
Best Network Firewall Products
What is the difference between static and dynamic network validation?
Screencast: Smoothwall offers firewall defense in lean times
New Cisco IOS bugs pose tempting targets, says Black Hat researcher
How to implement virtual firewalls in a complex network infrastructure
How to manage network bandwidth with distributed ISP bandwidth
Firewall rule management best practices
Should enterprises be running multiple firewalls?
What are the disadvantages of proxy-based firewalls?

Network Security Tactics
Screencast: Find rogue wireless acess points with Vistumbler
How to prepare for a secure network hardware upgrade
Preventing SQL injection attacks: A network admin's perspective
Screencast: How to launch an OpenVAS scan
Wireless network guidelines for PCI DSS compliance
Aligning network security with business priorities
Scanning with N-Stalker offers basic Web application security assessment
Lifecycle of a network security vulnerability
Screencast: BackTrack 4 offers an arsenal of penetration testing tools
Network access control technology: Over-hyped or underused?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
bastion host  (SearchSecurity.com)
firewall  (SearchSecurity.com)
Firewall Builder  (SearchSecurity.com)
screened subnet  (SearchSecurity.com)
virus  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Research Solutions for Network Security, Access Control and Security Threats
TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts