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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Would anyone know how to mount an internal modem on Solaris on PC? (7 Replies)
Discussion started by: softarch
7 Replies
2. UNIX for Advanced & Expert Users
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
3. Programming
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
4. UNIX for Dummies Questions & Answers
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
5. Windows & DOS: Issues & Discussions
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
6. AIX
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
7. UNIX for Advanced & Expert Users
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
8. Shell Programming and Scripting
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
9. IP Networking
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
10. UNIX for Advanced & Expert Users
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
LEARN ABOUT DEBIAN
netstat-nat
netstat-nat(1) General Commands Manual netstat-nat(1)
NAME
netstat-nat - Show the natted connections on a linux iptable firewall
SYNOPSIS
netstat-nat [options]
DESCRIPTION
netstat-nat Displays NAT connections managed by netfilter/iptables which comes with the > 2.4.x linux kernels.
The program reads its information from '/proc/net/ip_conntrack' or '/proc/net/nf_conntrack', which is the temporary conntrack-storage of
netfilter.
OPTIONS
-h displays help
-n don't resolve IPs/portnumbers to host/portnames
-p <protocol>
display NAT connections with protocol selection (see /etc/protocols)
-s <source host>
display connections by source IP/hostname
-d <destination host>
display connections by destination IP/hostname
-S display SNAT connections
-D display DNAT connections
-L display only connections to NAT box self (doesn't show SNAT & DNAT)
-R display only connections routed through the NAT box (doesn't show SNAT & DNAT)
-x extended view of hostnames
-r <src|dst|src-port|dst-port|state>
sort connections
-o no output header
-N display NAT box connection information (only valid with SNAT & DNAT)
-v prints version
FILES
/proc/net/ip_conntrack or /proc/net/nf_conntrack
SEE ALSO
http://www.tweegy.nl/projects/netstat-nat/
http://www.netfilter.org/
AUTHOR
netstat-nat has been written by D.Wijsman danny@tweegy.nl
The manual page has been written by marceln@xs4all.nl
July 2002 netstat-nat(1)