Forwarding internal internet packets to internal webserver using iptables


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Forwarding internal internet packets to internal webserver using iptables
# 1  
Old 11-11-2008
Forwarding internal internet packets to internal webserver using iptables

Hi,

I need to redirect internal internet requests to a auth client site siting on the gateway. Currently users that are authenticated to access the internet have there mac address listed in the FORWARD chain. All other users need to be redirected to a internal site for authentication.

Can point me in the right direction

Thanks
# 2  
Old 11-12-2008
transparent proxying

Hi,

If I understand what you want it is called transparent proxying and can be achieved with something like the following:
$IPTABLES -t nat -A PREROUTING -i $INTERNAL_IFACE -p tcp --dport 80 -j REDIRECT --to-port 3128
or you can redirect to any other port you like (the above implies redirection to the same machine).
If you want to redirect on another ip then you have to do something like the following:
$IPTABLES -t nat -A PREROUTING -i $INTERNAL_IFACE -p tcp -d <original dest ip> -j DNAT --to <new dest ip>

Hope this helps
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Ways to quickly check if you are connected to the internet while on an internal network

I need some help thinking of ways to quickly check if I am connected to the internet while on an internal network. I never lose connection to the internal network but for some annoying reason I lose the internet quite often. I don't get any errors or warnings. I usually find out that I have lost my... (2 Replies)
Discussion started by: cokedude
2 Replies

2. IP Networking

Capture packets (TcpDump) and forwarding them

Hi, I want to capture a certain type of packets (selected according to the protocol) coming to my PC and then transmit them to another PC. I had the idea to use tcpdump to filter input packets and extract those chosen. Well my questions are: 1- after filtering input packets, those that have not... (1 Reply)
Discussion started by: ziedf
1 Replies

3. Shell Programming and Scripting

Internal variable

i have a file named (Loop) that contains numbers separated by pipelines e.g. : 521|55 545|564 . . . and another file named (search) that contains numbers e.g.: 99999777|332|332 31215648|458|764 when i run this Script: nawk 'BEGIN{FS="|"} NR==FNR{a= $1"|"$2"|";next} a{print... (2 Replies)
Discussion started by: guardianangel
2 Replies

4. UNIX for Advanced & Expert Users

iptables internal NAT with two public IP

Hello Guys, I have a debian machine that work as a firewall (iptables + squid 2.6) with two physical interfaces: eth0 (public interface) and eth1 (internal interface LAN). I have created an alias eth1:1 in order to have two subnets on same physical interface: cat/etc/network/interfaces auto... (0 Replies)
Discussion started by: sincity2006
0 Replies

5. AIX

Internal error

Dear experts, please inform when i am trying to use dbx to debug my code, iam getting following error: internal error: expected member attribute 's', 'p', 'r' or 'b', found... (1 Reply)
Discussion started by: vin_pll
1 Replies

6. Windows & DOS: Issues & Discussions

regarding internal modems

hi I have two internal modems connected in my system. For these two lines i have connected two separate telephone lines. When i try to call from one modem through the telephone line i get connect message. when i try to call from the other telephone line connected to another modem i did not... (3 Replies)
Discussion started by: rajas1982
3 Replies

7. UNIX for Dummies Questions & Answers

hdisk0 internal

goodpeople, have a corrupt boot volume and systems keep's on crashing with it. suspecting drive is bad. question is how does one determine which of the 5 internal drives I have in my cage is hdisk0 any help would be appreciated Thnx (2 Replies)
Discussion started by: Student37
2 Replies

8. Programming

Unix Internal

What is Unix Internals on a Layman's Language.Can I consider Unix Internal expert for a Unix's Position? Thanks (3 Replies)
Discussion started by: Rengi
3 Replies

9. UNIX for Advanced & Expert Users

internal security

We have about 300 users in the systeme , they mainly use the software called "netterm" to telnet our RH server to access the db in our internal network , I know there are some secure program like ssh , that is more secure for connection , do you think it is good idea to replace the software in our... (2 Replies)
Discussion started by: ust
2 Replies

10. UNIX for Dummies Questions & Answers

how internal modem on pc

Would anyone know how to mount an internal modem on Solaris on PC? (7 Replies)
Discussion started by: softarch
7 Replies
Login or Register to Ask a Question