Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Charles Romestant" <cromestant@gmail.com>
To: Grant Taylor <gtaylor@riverviewtech.net>
Cc: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Port Forwarding .
Date: Wed, 9 Jul 2008 15:41:51 +1930	[thread overview]
Message-ID: <5078d3df0807081311mbd257dctc19ce6c14d36ed10@mail.gmail.com> (raw)
In-Reply-To: <5078d3df0807081254m44696415s23951989a736b741@mail.gmail.com>

Ok, found out what the problem was... and i am trlly sorry to have
wasted your time.
Problem was simple
host C did not have the gateway set to the ip of the NAT... so
basically no return path for packets IIRC.

again, thank you very much for your help

Charles.

On Wed, Jul 9, 2008 at 3:24 PM, Charles Romestant <cromestant@gmail.com> wrote:
> Ok here are 2 consecutives saves while trying to access the web server.
>
>
> root@charz-server:/home/charz# iptables-save -c
> # Generated by iptables-save v1.3.6 on Tue Jul  8 15:23:36 2008
> *nat
> :PREROUTING ACCEPT [1287:172779]
> :POSTROUTING ACCEPT [39:5989]
> :OUTPUT ACCEPT [41:6213]
> [2:128] -A PREROUTING -d 10.0.1.192 -i eth0 -p tcp -m tcp --dport 80
> -j DNAT --to-destination 10.0.10.1
> [0:0] -A POSTROUTING -s 10.0.10.1 -o eth0 -p tcp -m tcp --sport 80 -j
> SNAT --to-source 10.0.1.192
> COMMIT
> # Completed on Tue Jul  8 15:23:36 2008
> # Generated by iptables-save v1.3.6 on Tue Jul  8 15:23:36 2008
> *filter
> :INPUT ACCEPT [7829:710453]
> :FORWARD ACCEPT [1:48]
> :OUTPUT ACCEPT [3244:550936]
> :fail2ban-ssh - [0:0]
> :spa - [0:0]
> [19:1008] -A FORWARD -d 10.0.10.1 -i eth0 -o eth1 -p tcp -m tcp
> --dport 80 -j ACCEPT
> [0:0] -A FORWARD -s 10.0.10.1 -i eth1 -o eth0 -p tcp -m tcp --sport 80
> -j ACCEPT
> COMMIT
> # Completed on Tue Jul  8 15:23:36 2008
>
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> root@charz-server:/home/charz# iptables-save -c
> # Generated by iptables-save v1.3.6 on Tue Jul  8 15:23:38 2008
> *nat
> :PREROUTING ACCEPT [1288:172897]
> :POSTROUTING ACCEPT [39:5989]
> :OUTPUT ACCEPT [41:6213]
> [2:128] -A PREROUTING -d 10.0.1.192 -i eth0 -p tcp -m tcp --dport 80
> -j DNAT --to-destination 10.0.10.1
> [0:0] -A POSTROUTING -s 10.0.10.1 -o eth0 -p tcp -m tcp --sport 80 -j
> SNAT --to-source 10.0.1.192
> COMMIT
> # Completed on Tue Jul  8 15:23:38 2008
> # Generated by iptables-save v1.3.6 on Tue Jul  8 15:23:38 2008
> *filter
> :INPUT ACCEPT [7844:711502]
> :FORWARD ACCEPT [1:48]
> :OUTPUT ACCEPT [3254:553344]
> :fail2ban-ssh - [0:0]
> :spa - [0:0]
> [19:1008] -A FORWARD -d 10.0.10.1 -i eth0 -o eth1 -p tcp -m tcp
> --dport 80 -j ACCEPT
> [0:0] -A FORWARD -s 10.0.10.1 -i eth1 -o eth0 -p tcp -m tcp --sport 80
> -j ACCEPT
> COMMIT
> # Completed on Tue Jul  8 15:23:38 2008
>
>
> On Wed, Jul 9, 2008 at 3:20 PM, Grant Taylor <gtaylor@riverviewtech.net> wrote:
>> On 07/08/08 14:40, Charles Romestant wrote:
>>>
>>> ok it was set to 0, but changing it did not do anything, here is the
>>> iptables-save output
>>
>> *nod*
>>
>> Uh, can I (re)ask for an iptables-save, but this time with a "-c" added to
>> the end of it so that it will include packet counters?  (I forgot that
>> iptables-save does not show packet counts like iptables -L.  Sorry.)
>>
>>> Again , thank you for your help
>>
>> *nod*
>>
>> You are welcome.
>>
>>
>>
>> Grant. . . .
>> --
>> To unsubscribe from this list: send the line "unsubscribe netfilter" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>
>
> --
> Charz
>



-- 
Charz

  reply	other threads:[~2008-07-08 20:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07 21:49 Port Forwarding Charles Romestant
2008-07-07 22:10 ` Grant Taylor
2008-07-07 22:32   ` Charles Romestant
2008-07-07 22:33     ` Charles Romestant
2008-07-07 23:10       ` Charles Romestant
2008-07-07 23:58         ` Charles Romestant
2008-07-08  2:23           ` Grant Taylor
2008-07-08 19:20             ` Charles Romestant
2008-07-08 19:37               ` Grant Taylor
2008-07-08 19:40                 ` Charles Romestant
2008-07-08 19:50                   ` Grant Taylor
2008-07-08 19:54                     ` Charles Romestant
2008-07-08 20:11                       ` Charles Romestant [this message]
2008-07-08 20:21                         ` Grant Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5078d3df0807081311mbd257dctc19ce6c14d36ed10@mail.gmail.com \
    --to=cromestant@gmail.com \
    --cc=gtaylor@riverviewtech.net \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox