Linux Netfilter discussions
 help / color / mirror / Atom feed
From: gazoxtapod <gazoxtapod@embarqmail.com>
To: netfilter@vger.kernel.org
Subject: Re: Can't override filter section OUTPUT DROP / INPUT DROP Policy
Date: Fri, 25 Aug 2017 20:03:43 +0000	[thread overview]
Message-ID: <59A0829F.3020409@embarqmail.com> (raw)
In-Reply-To: <84281c34-08f4-2979-ad33-78d8bec77c39@wagsky.com>

System TOPOLOGY:

       LAN         Static IP    _________
Desktop ----------------------|         |
                               |         |     _________
Tablet ) ) ) ) ) \       DHCP |         |    |         |
                  WiFi AP -----| LinkSys | ?? |  ZyXEL  |
Cell Phone ) ) ) /            | BEFSX41 |----| PK5100Z |---- ISP DSL
                        DHCP   | Router  |    |  Modem  |
Desktop ----------------------|         |    |_________|
                        DHCP   |         |
RPi2 -------------------------|_________|

I am strong in hardware and test software, but VERY weak in networking. 
  Everything WORKS just fine right now.  I am just paranoid about 
leaving a device available continuously for connection to the Internet 
if I don't have to.  My desktop system doesn't even have a hard/SSD 
drive ... it is a Linux Mint LiveMedia system running from ROM SD or USB 
flash drive, and it is powered down or disconnected from the Internet 
when not in use.  Before I do any secure transactions, I reboot a virgin 
system.

I have seen a lot of demand for a "DSL Usage Monitor" due to data caps 
imposed by ISPs.  I looked for a solution because my wife wants 
streaming TV, but didn't find anything worthwhile.  I pulled the Pi out 
of my "Junk Box" when I came up with this idea.  The RPi2 appears to be 
a great solution ... cheap ... only a cheap LCD display (20x4) required 
... wired or WiFi ... and it works GREAT:

PYTHON REQUESTS CODE:   Courtesy of "Roger Shruber" #Python
=====================  Payload is the login arguments strings
s = requests.Session()
resp = s.post(login_url, data=payload)
rawout = s.get(data_url)
rawdata = str(rawout.text)
print rawdata              <-- parse this data!

That's how EASY it is!  I want to keep it as simple and plug-and-play as 
possible.  If using the same modem, the only things that have to be 
loaded are the account arguments.  Why complicate elegant simplicity?  I 
plan to publish the results as a template for a DIY project for others 
who are worried about data caps.  Plug it in and watch it!

However, why not make it as bullet-proof as possible, IF IT DOESN'T 
COMPLICATE THINGS ... beyond all recognition.  Hence, IF the Pi firewall 
can be configured to block all extraneous access, let's DO IT!  I'm just 
to dumb and stubborn to think that it can't be done, but then I've been 
wrong MANY times before.  I know NOTHING about VLANs, proxys, and d#!n 
little about iptables.

So, thanks for your input, but no, I'm not putting more hardware into 
the system and I really don't want to change the topology and I don't 
want to mess with the router.  I just need help in tweaking the firewall 
rules, or convincing me that it really can't be done.  Hey, that's what 
the iptables are for, isn't it ... controlling access to fit the needs 
of the system?

This is excruciatingly simple, but halfway close:
  . . sudo iptables -P INPUT DROP        <--  P:Policy
  . . sudo iptables -P OUTPUT ACCEPT

So I'm really hoping for an answer: Why doesn't the table in my op work?

I sincerely do thank everyone for their patient pondering of this case.
Blessings in abundance, all the best, & ENJOY!
Art

On 08/25/2017 04:12 PM, netfilter@allycomm.com wrote:
> Without knowing the network topology you're using, suggesting an
> approach can be challenging.
> With the right topology, your firewall rules can become nearly "trivial"
>
> I would suggest either a second physical
> interface (a USB Ethernet dongle) or a VLAN to easily segregate traffic
>
> Approach 1 -- Provide staticroute to modem  ...
>
> Approach 2 -- Bridge to VLAN  ...
>
> Approach 4 -- Proxy connections to the modem  ...
>
>
> On 8/25/17 7:16 AM, gazoxtapod wrote:
>> [...]
>> I'm trying to use the Pi2 as an appliance to monitor DSL Usage from my
>> DSL modem (192.168.0.1), which is between a (nearly default
>> configuration) firewall router for my LAN and the ISP.  The Pi2 box
>> project, when completed, is strictly an appliance that is a client to
>> the modem, reading date/time and DSL usage and error status, and
>> displaying this on an LCD display.
>>
>> * I need to allow the Pi2 to negotiate a DHCP request for an IP
>> address from the router on bootup. (This is the system default - no
>> need to do anything)
>> * I need to allow the Pi2 to make a periodic connection to the modem
>> and fetch data. (I do this with Python Requests - it works)
>> * I am trying to block all other types of incoming and outgoing
>> connections. This is what I can NOT do.
>>
> [...]
>

      parent reply	other threads:[~2017-08-25 20:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 14:16 Can't override filter section OUTPUT DROP / INPUT DROP Policy gazoxtapod
2017-08-25 16:12 ` netfilter
2017-08-25 16:16   ` netfilter
2017-08-25 20:03   ` gazoxtapod [this message]

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=59A0829F.3020409@embarqmail.com \
    --to=gazoxtapod@embarqmail.com \
    --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