IPTables and IIS

This is a discussion on IPTables and IIS within the Linux Networking forums, part of the Linux Forums category; Hi. I've a Linux machine acting as a router, and I've a IIS server in my LAN. I ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-10-2006
Tony
 
Posts: n/a
Default IPTables and IIS

Hi.

I've a Linux machine acting as a router, and I've a IIS server in my LAN.

I set up these rules to NAT web traffic to IIS server:

iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp -s ! my_lan_address/24 -d
external_ip --dport 80 -j DNAT --to iis_server_ip:80

it works great, but I cannot see client IP address that is connecting to my
website. IIS shows me Linux IP ethernet address.

How can I setup iptables' rules to show client's IP address to IIS?

Thank you so much for your help.

Tony.


Reply With Quote
  #2 (permalink)  
Old 02-11-2006
Robert
 
Posts: n/a
Default Re: IPTables and IIS

On Fri, 10 Feb 2006 23:03:45 +0100, Tony wrote:

> I set up these rules to NAT web traffic to IIS server:
>
> iptables -t nat -A POSTROUTING -j MASQUERADE
> iptables -t nat -A PREROUTING -p tcp -s ! my_lan_address/24 -d
> external_ip --dport 80 -j DNAT --to iis_server_ip:80
>
> it works great, but I cannot see client IP address that is connecting to my
> website. IIS shows me Linux IP ethernet address.
>
> How can I setup iptables' rules to show client's IP address to IIS?


First things first. The rule with POSTROUTING, you might want to place
the internet facing interface in this rule. This is why you are only
seeing the Linux IP Address. It's MASQUERADing all traffic no matter
which interface it goes out.


--

Regards
Robert

Smile... it increases your face value!


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:34 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0