euglug.org

[Eug-lug] ipchains

작성자

카테고리:



John SechrestSun Aug 28 21:19:38 PDT 2005

Bob, 

Are you using IP chains or are you using Iptables. 

It thought they were mutually exclusive...

I have used a DNAT rule to do this kind of redirection behind
the scenes. But if you want to do it in the foreground, 
then you want to use something other than DNAT. 

I expect to see something like:

$IPTABLES  -t nat -A PREROUTING -d 1.3.4.5 -p tcp --dport 80 -j DNAT --to-destination 3.2.3.9:89

I see the initial destination being identified, but I don't see the 
new destination being set. What IP do you expect things to go to.
If it is the same machine, do you really want the REDIRECT instead?






"Bob Crandell" <bob at assuredcomp.com> writes:

 % Hi,
 % 
 % I have an ipchains rule set running on one computer that works well.  This
 % computer is being replaced by another computer that I don't have any control
 % over.  What needs to happen is the traffic is filtered through the old box and
 % routed to the new one.
 % 
 % 123.345.567.789 is the address of the new box.
 % 
 % I added this:
 % iptables -A FORWARD -p tcp -i eth0 -o eth0 -d 123.345.567.789 --dport 800 -m
 % state --state NEW -j ACCEPT
 % 
 % but it doesn't redirect correctly.  What am I doing wrong?
 % 
 % Thanks
 % 
 % --
 % Bob Crandell, CLS, CNS
 % Assured Computing, Inc.
 % When you need to be sure.
 % http://www.assuredcomp.com/
 % 921 Country Club Road, Suite 100
 % Eugene, OR 97402
 % Voice - 541-868-0331
 % FAX - 541-463-1627
 % 
 % This message is intended solely for the use of the individual and entity to
 % whom it is addressed, and may contain information that is privileged,
 % confidential, and exempt from disclosure under applicable state and federal
 % laws. If you are not the addressee, or are not authorized to receive for the
 % intended addressee, you are hereby notified that you may not use, copy,
 % distribute, or disclose to anyone this message or the information contained
 % herein. If you have received this message in error, immediately advise the
 % sender by reply email and destroy this message.
 % 
 % 
 % _______________________________________________
 % EUGLUG mailing list
 % euglug at euglug.org
 % http://www.euglug.org/mailman/listinfo/euglug

-----
John Sechrest          .         Helping people use
                        .           computers and the Internet
                          .            more effectively
                             .                      
                                 .       Internet: sechrest at peak.org
                                      .   
                                              . http://www.peak.org/~sechrest