LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-11-2003, 01:31 AM   #1
|DeJoTa|
LQ Newbie
 
Registered: Jul 2003
Location: Brazil - São Paulo
Distribution: slackware
Posts: 2

Rep: Reputation: 0
Post Redirect port with iptables


Hi all,

Here is my situation: i have a slackware box running a virtual machine under vmware. The virtual machine is a Windows 2003 server. In my server, i have 2 devices: eth0, vith the static/valid ip adress, and eth1 with my local network adress (192.168.0.0). The virtual machine gets the following ip adress: 192.168.237.128 and can ping the internet (i configure the virtual machine bridged with eth1, no problem).

What i want: redirect the traffic from port 80 of my linux (eth0, valid adress) to the virtual machine (192.168.237.128).

I've tryed the following solution:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.237.128:80
iptables -t nat -A POSTROUTING -s 192.168.237.128 -p tcp -j SNAT --to <my valid ip adress>

But it doesn't work. I see this in the /proc/net/ip_conntrack :

tcp 6 111 SYN_SENT src=<ip_of_my_remote_box> dst=<ip_of_eth0(valid adress)> sport=42560 dport=80 [UNREPLIED] src=192.168.237.128 dst=<ip_of_my_remote_box> sport=80 dport=42560 use=1

Please... who can welp me? I spent 2 days in this problem

Thanx in advance... and sorry for the bad english

André Aun
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 redirect _ben_deb_ Linux - Networking 7 11-13-2004 05:06 AM
Outside FTP Port 21 redirect to different port inside LAN??? hendrixx Linux - Security 5 06-05-2004 06:42 PM
Problem with iptables port redirect and rh9 zkn Linux - Networking 0 05-05-2004 04:34 PM
iptables redirect slack Linux - Networking 0 06-17-2002 04:04 AM
iptables redirect bhartnett Linux - Networking 1 09-26-2001 09:11 PM


All times are GMT -5. The time now is 08:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration