switched network environment, ubuntu ,accept all prerouting postrouting input forward output (don't do so in a production environment), each box has only eth0
A - 192.168.10.1
B - 192.168.10.2
C - 192.168.10.3 wheres apache2 is running on port 80
what I want to do is by typing B's address in box A's browser, and actually browsing C
now, configure B as an intermediate, and forward all incoming web request to C and the traffic back from C to its own origin (masquerade)
# enable ip forward first
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 80 -d 192.168.10.3 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-dest 192.168.10.3
http://ubuntuforums.org/showthread.php?t=183994
http://forums.whirlpool.net.au/archive/505897
http://en.wikipedia.org/wiki/IP_masquerading
Saturday, 21 August 2010
Subscribe to:
Post Comments (Atom)
Labels
- ahk (1)
- android (1)
- apache (1)
- cifs (1)
- cygwin (2)
- E17 (1)
- gOS (1)
- grldr (4)
- grub (4)
- linux (5)
- mp4 (4)
- mysql (2)
- mytv (5)
- mytv download (5)
- php (2)
- pidgin (1)
- pxe (1)
- rtmp (7)
- rtmpdump (1)
- rtmpe (5)
- samba (1)
- sed (5)
- ssed (4)
- tvb (1)
- tvb.com (6)
- tvb.com.hk (6)
- ubuntu (2)
- virtualbox (1)
- winflp (1)
- xargs (1)
No comments:
Post a Comment