![]() |
pppoe-setup masquerade firewall vs custom firewall
How can i setup that when i start pppoe-start will start my own customized firewall rules instead of ones that i selected while doing pppoe-setup?
Thanks! |
Create a symbolic link /etc/ppp/ip-pre-up that points to the firewall script you want to run and set the firewall option to NONE in pppoe-setup.
|
Quote:
|
From 'man pppd'
Quote:
What do mean by "it didnt show up customized firewall"? Your firewall script will not be shown in pppoe-setup, but the rules in your custom firewall should show up in the output of 'iptables -L' when the connection is made. (Compare the output of 'iptables -L' before and after making a connection.) Also, is your firewall script executable? |
what ive done is in /etc/ppp/ ive created firewall script called firewalls
ive chmod +x the file. in pppoe-setup ive selected 0 for none firewall next ive created symlink in in /etc/ppp/ip-pre-up to point to /etc/ppp/firewalls now it looks as follows: Code:
/etc/pppbefore establishing ppp connection i make sure no firewall rules are set when i do iptables -L Code:
root@parade:~# iptables -Lbut if i run firewalls script manually before connection is made then its executed successfully and remains even after the connection is made. what am i doing wrong? |
It seems that you have done all that is required. My only thought is that perhaps the symlink is not correct.
From your listing I note that the permissions for the symlink are not the same as for the firewalls script. Try deleting the symlink and remaking it. i.e. (as root) cd /etc/ppp rm ip-pre-up ln -s firewalls ip-pre-up |
Those are the proper permissions on the symlink. symlinks always have those permissions unless for some strange reason you change them.
As for why pppoe-start isn't running the firewall rules, that could be any number of issues. I'm not familiar with pppoe-*, so I'll defer to those who are. However, unless you have some need to start and stop pppoe routinely as oppossed to say, running it once on boot-up, I'd just put your firewall rules in /etc/rc.d/rc.firewall and run pppoe-start inside them. |
Ah, of course the symlink permissions are correct.
Just had a look at the setup that I had on an old machine. Try making the symlink an absolute path. i.e. ln -s /etc/ppp/firewalls ip-pre-up |
Hi guys sorry for long delay!
As alan hicks stated to put firewalls to rc.firewalls to /etc/rc.d/ it works on booting ive tried that before, however i want to know what cause ip-pre-up not to start while doing pppoe-start manually :) allend - ive tried also absolute path and no joy ive also tried to rename firewalls to ip-pre-up directly and again no joy wondering what might cause ip-pre-up not to start? firewalls has modified rules of firewall-masq nothing else |
I am scratching my head at this point. You are executing 'pppoe-start' as root, I presume?
|
yes im starting pppoe-start as root, tried also to start as normal user, but it must be started as root.
|
Ok first thing to understand is the rp-pppoe is a bit different than normal ppp.
Set "FIREWALL=MASQUERADE" in /etc/ppp/pppoe.conf Then simply rename your firewall script to "firewall-masq" (make sure it's chmod +x) And all should be well (maybe back-up the existing firewall-masq first) |
Quote:
But what im wondering how to make ip-pre-up to work aswell, wheres the catch why it dosent want to start? as far as i found is that ip-pre-up is linked with ppp-2.4.4 package and ip-pre-up scripts wont run unless there is 2.4.4 version installed or higher. i do have it installed but we are talking about rp-pppoe package. So my question is how its possible for allend got it ip-pre-up started when establishing pppoe connection? Its interesting! Can someone clarify for me the difference between rp-pppoe and ppp packages? Thanks! |
| All times are GMT -5. The time now is 08:21 PM. |