Networking Forums

Networking Forums > Computer Networking > Linux Networking > Forward packets from one system to another

Reply
Thread Tools Display Modes

Forward packets from one system to another

 
 
andy
Guest
Posts: n/a

 
      11-23-2004, 05:58 PM
Hi All,

I have two systems and I would like all packets that come to system 1 to
be forwarded to system 2.

So, let say the system 2 is running web browser on 80. I would like to
be able to say:

curl http://system2:8080

and get the page running on system2 on 80.

So I tried the following:

iptables --append PREROUTING -t nat --protocol tcp --dport 8080 --jump
DNAT --to-destination system2:80
iptables --append FORWARD --protocol tcp --dport 8080 --jump ACCEPT

but it did not work.

Any idea on what am I doing wrong?

Thanks.

Andy
 
Reply With Quote
 
 
 
 
Alex Harsch
Guest
Posts: n/a

 
      11-24-2004, 07:16 AM
andy wrote:

> Hi All,
>
> I have two systems and I would like all packets that come to system 1 to
> be forwarded to system 2.
>
> So, let say the system 2 is running web browser on 80. I would like to
> be able to say:
>
> curl http://system2:8080
>
> and get the page running on system2 on 80.
>
> So I tried the following:
>
> iptables --append PREROUTING -t nat --protocol tcp --dport 8080 --jump
> DNAT --to-destination system2:80
> iptables --append FORWARD --protocol tcp --dport 8080 --jump ACCEPT
>
> but it did not work.
>
> Any idea on what am I doing wrong?
>
> Thanks.
>
> Andy

Hello,

the rule seems to be OK. Try "iptables -F -t nat" to make sure that no other
rule applies before or
iptables -I PREROUTING 1 -t nat --protocol tcp --dport 8080 --jump DNAT
--to-destination system2:80

With kind regards, Alex
 
Reply With Quote
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to forward packets on two NICs Julien Simbola Linux Networking 3 11-04-2008 08:47 AM
'system' is generating TCP Packets, who, what, where? Scott Townsend Windows Networking 5 05-26-2006 02:12 AM
Looking for iptables applications code (iptables.c) to run some rules to forward packets tvnaidu@yahoo.com Linux Networking 2 01-17-2005 05:01 PM
Can AP client mode forward DHCP packets? Sven Wireless Internet 2 11-22-2004 08:20 PM
DNAT packets not getting to FORWARD chain Gavin Linux Networking 0 06-27-2004 02:32 AM



1 2 3 4 5 6 7 8 9 10 11