Networking Forums

Networking Forums > Computer Networking > Linux Networking > iptables: DNAT + user defined chains

Reply
Thread Tools Display Modes

iptables: DNAT + user defined chains

 
 
Jan Kanty Palus
Guest
Posts: n/a

 
      03-05-2004, 03:06 PM
My firewall configuration consist of many rules which redirect some
ports on my server to particular hosts in lan. I wanted to reduce them
so I tried to do something like this:

iptables -t nat -N new
iptables -t -A PREROUTING -i ethX -p tcp --dport <port>:<port> -j new

and in chain 'new' redirect port to right machine. The problem is that
in chain 'new' i have no option '--to-destination'. Is it possible to do
this or where can i find some info about it?
 
Reply With Quote
 
 
 
 
jack
Guest
Posts: n/a

 
      03-05-2004, 09:54 PM
Jan Kanty Palus wrote:

> iptables -t nat -N new
> iptables -t -A PREROUTING -i ethX -p tcp --dport <port>:<port> -j new


Just for clarification:

Should the second line not start with:
iptables -t _nat_ -A PREROUTING

Please make Yourself clear here.


Cheers, Jack.

--
----------------------------------------------------------------------
My personal reading of the string "MicroSoft" expands to "NanoWeak"...
 
Reply With Quote
 
Jan Kanty Palus
Guest
Posts: n/a

 
      03-06-2004, 08:24 AM
> Just for clarification:
>
> Should the second line not start with:
> iptables -t _nat_ -A PREROUTING
>
> Please make Yourself clear here.
>


Oh it was just a mistake in writing the post, but I found out
there was another mistake in writing rules... I tried to put
'--to <ip>' option in my user-defined chain rule, before I
gave a target '-j DNAT' so iptables didn't know antything about
it, and gave an error. Now everything works fine, sorry for
problem and thanks for reply.

 
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
iptables: user-def'd chains: allowed names? jqpx37 Linux Networking 1 10-15-2006 05:47 PM
DNS NAMESERVER FUNCTIONS - USER DEFINED / BUILT-IN? URGENT! zoltan Linux Networking 0 02-13-2006 04:27 AM
Do all DNS Nameserver functions have to be user-defined? Urgent... zoltan Linux Networking 0 02-10-2006 05:14 AM
TFTP server not receiving a file which sent on user defined port from windows client GS Linux Networking 1 07-13-2005 05:13 PM
Iptables, Cisco 677, DNAT Eugene van Rooyen Linux Networking 0 08-10-2003 10:57 AM



1 2 3 4 5 6 7 8 9 10 11