maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] genwall a simple iptables firewall (https://talk.maemo.org/showthread.php?t=85444)

disappear 2013-02-24 14:37

Re: [Announce] genwall a simple iptables firewall
 
Hi to all,maybe this is off topic but i have to try to ask.I want to block traffic to facebook from n900 to my laptop.Command which i use is:
Quote:

iptables -t nat -I PREROUTING -i wlan0 -m tcp -p tcp -d www.facebook.com --dport 443 -j DROP
but i have still access to facebook site,maybe i should try first with:
echo "1" > ... and then arpspoof ....
and finally with iptables ......

then i decided to bock all traffic with:
Quote:

iptables -F
iptables -A INPUT -j REJECT
iptables -A OUTPUT -j REJECT
iptables -A FORWARD -j REJECT
but again no result

one more try to drop all incoming connections on a specific network interface with:
Quote:

iptables -A INPUT -i wlan0 -s 192.168.0.0/16 -j DROP
no result
if anyone from you made some progress with these tools,let share it

info about commands for iptables from here
http://linuxconfig.org/collection-of...iptables-rules

independent 2014-01-30 19:40

Re: [Announce] genwall a simple iptables firewall
 
Hi, sorry if I've missed this.. But I can't see how this will automatically start at boot. My settings don't seem to be saved after exit (and saving) either. It seems easiest to save the iptables rules and then start at boot with an upstart script perhaps.

Halftux 2014-01-31 11:24

Re: [Announce] genwall a simple iptables firewall
 
Quote:

Originally Posted by independent (Post 1409872)
Hi, sorry if I've missed this.. But I can't see how this will automatically start at boot. My settings don't seem to be saved after exit (and saving) either. It seems easiest to save the iptables rules and then start at boot with an upstart script perhaps.

This function is not implemented at the moment. The save function save only the settings from the application.

- I will add an option to load iptables rules at startup for the next release

Halftux 2014-02-01 16:02

Re: [Announce] genwall a simple iptables firewall
 
1 Attachment(s)
Ok next update 1.0.3 should be soon available.

Under local->settings there is some checkbox for iptables persistence reboot...

If this checkbox is enabled and you push the "gen" button, to generate your rules, another file will be created in /etc/network/if-up.d/iptables. This will automatically run your rules file.

To delete this file you can use the "delete boot file" button.

sixwheeledbeast 2014-02-01 22:35

Re: [Announce] genwall a simple iptables firewall
 
Did you see my comments on http://maemo.org/packages/package_in...genwall/1.0.2/

peterleinchen 2014-02-01 22:54

Re: [Announce] genwall a simple iptables firewall
 
Yep, second that.
And a nice little tiny desktop file would be nice (it is a GUI not cli).

Halftux 2014-02-03 09:40

Re: [Announce] genwall a simple iptables firewall
 
Quote:

Originally Posted by sixwheeledbeast (Post 1410371)
Could you please tidy up the unnecessary files in the package and modify the packages not to depend on rootsh. You should use a sudoers.d file if it requires root. Thank you.[/url]

You mean unnecessary files from deb package?
I really tried all method to gain root access also with a sudoers.d file.
However I open some shell session and calling also some scripts with the main application and when I used sudoers.d It can start genwall as root but every new session is not a root session. I will look into my application maybe there is another way to open a sub session as root.

I think rootsh is also required because I ask for a root password at startup. No rootsh no password or am I wrong?

Halftux 2014-02-03 09:47

Re: [Announce] genwall a simple iptables firewall
 
Quote:

Originally Posted by peterleinchen (Post 1410374)
Yep, second that.
And a nice little tiny desktop file would be nice (it is a GUI not cli).

I think I shouldn't update my application and need to remove before reinstall. I didn't know that it has no desktop file.:confused:

It should has a desktop file under network, which runs a script in
/opt/genwall/genwall_desk.sh

Thanks for the input.

peterleinchen 2014-02-03 21:46

Re: [Announce] genwall a simple iptables firewall
 
Hey halftux,

what kind of prob'ems with sudoers.file you ran into?
In general you put a file with all.your desired applications and scripts into /etc/sudoers.d and run once update-sudoers from postinstall script. Then you are able/allowed to call that app with 'sudo /opt/genwall/genwall' and there is no need for "sudoing" like genwall_desktop.sh.
For your new.sh sessions IDK, but you are safe to move out your desired sh actions into dedicated scripts and add/allow them also into sudoers file (worked for me. You need to call them then with 'sudo ,yScript inside your app). Also you might run complete GUI as user and only run scripts needing root access. Just as a reminder :)
About root password without rootsh I really do not know as it is too long time ago ;)

Halftux 2014-02-04 16:54

Re: [Announce] genwall a simple iptables firewall
 
@peterleinchen

I am sorry I removed everything and install the deb again and everytime I get a desktop file. I can't reproduce your situation.

Do you have these files?:

\usr\share\icons\hicolor\64x64\apps\genwall.png
\usr\share\application\hildon\genwall.desktop


And rootsh is not needed for set a root password. I think when I bought this phone I didn't know that it has a default root password and I read somewhere when you install openssh server you can set a root password. I mixed up openssh with rootsh. So I will try to optimize my script calls and qt console calls so that they will work with sudoers.d and removing rootsh.


All times are GMT. The time now is 23:52.

vBulletin® Version 3.8.8