LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-20-2005, 03:17 AM   #1
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
accessing OWA thru iptables-based firewall


I've got a dual-homed linux box acting as the router for a small lan. This box has one nic w/static public ip (wan), and other nic with private ip (lan).

Inside the lan runs a 2003 server with Outlook Web Access (OWA). As much as I don't like Windoze, client wants to access OWA from outside office.

Does anybody know how to setup iptables script to allow OWA access? Probably a few PREROUTING and FORWARD rules.
Also would like to know if anybody's done this and how.

Here's my crappy ascii pic of the layout (sucks, but hey, it's late and i'm tired).
---------
WAN
---------
|
V
----------------------------
WAN nic
----------------------------------

LINUX ROUTER

----------------------------------
LAN nic
----------------------------
|
V
------------------------
2003 OWA box
------------------------

Thx in advance for help
 
Old 12-20-2005, 03:39 AM   #2
jrbush82
Member
 
Registered: Mar 2002
Location: Hampton, VA
Posts: 86

Rep: Reputation: 15
Configure the outlook client to use RPC over HTTP. Of course, then just forward port 80 inbound to the exchange server.

http://office.microsoft.com/en-us/as...402731033.aspx

The IPTABLES script was created using the "Iptables Script Generator" found at http://iptables-script.dk/. You will of course have to edit it to reflect your IP addresses etc.. This script assumes that eth0 is your external interface, and eth1 is your internal interface.

#!/bin/sh

# iptables script generator: V0.1-2002
# Comes with no warranty!
# e-mail: michael@1go.dk

# Disable forwarding
echo 0 > /proc/sys/net/ipv4/ip_forward

LAN_IP_NET='192.168.0.1/24'
LAN_NIC='eth1'
OWA_SERVER='192.168.0.10'

# load some modules (if needed)

# Flush
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# enable Masquerade and forwarding
iptables -t nat -A POSTROUTING -s $LAN_IP_NET -j MASQUERADE
iptables -A FORWARD -j ACCEPT -i $LAN_NIC -s $LAN_IP_NET
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

# STATE RELATED for router
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Open ports to server on LAN
iptables -A FORWARD -j ACCEPT -p tcp --dport 80
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to $OWA_SERVER:80

# Enable forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

Last edited by jrbush82; 12-20-2005 at 04:00 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables with iptables-firewall.conf arno's matt3333 Slackware 16 06-28-2007 07:20 AM
Running OWA 2003 in Firefox minith Linux - Software 4 11-07-2005 11:30 PM
app-based firewall tohava Linux - Security 2 08-14-2005 06:59 PM
Need Help In Building a Web-based Firewall Configuration Tool for Linux(RH9-iptables) eason Linux - General 1 02-21-2004 05:34 PM
Web Based Firewall karunesh Linux - General 1 02-14-2002 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration