Skip to contentSkip to conversation

Configurationrequest for firewall with temporary ppp0-interface

DISCUSSION Ruprecht Helms 5 participants 5 messages Jun 30, 2005 – Jul 3, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I've the problem that I need some rules for a temporary ppp0 interface.
This interface is only active then the admin has made a dial-up on the server and has activated a ppp-daemon.

In the time the ppp0-Interface is up the connections should be able completely in both directions and through to clients. But this should only alowed for connections via ppp0.

Connections via the normal isdn0 should be protected by the normal firewallroules (iptables).

How have I to configure.

Regards,
Ruprecht

------------------------------------------------------------------------------------------
Ruprecht Helms IT-Service & Softwareentwicklung

Tel./Fax +49[0]7621 16 99 16
Web: htp://www.rheyn.de

#1 lore raw
Quoted 7 lines · Ruprecht Helms

I've the problem that I need some rules for a temporary ppp0 interface. This interface is only active then the admin has made a dial-up on the server and has activated a ppp-daemon.

In the time the ppp0-Interface is up the connections should be able completely in both directions and through to clients. But this should only alowed for connections via ppp0.

If this is your only ppp+ interface it is easy. You can add your rules to the existing firewall and leave them there.

If there are other ppp+ interfaces which should be more restricted, it is only slightly more difficult. pppd(8) has a feature to run scripts when an interface goes active and inactive, /etc/ppp/ip-{up,down} respectively. Put your rules to open the interface in ip-up and to close it in ip-down. (Some distributors use ip-{up,down}.local for local additions.)

Signature · 2 lines
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header
#2 lore raw
In reply to Ruprecht Helms

Just create rules specifying ppp0 as incoming and outgoing interface (-i and -o), e.g.

$IPTABLES -A FORWARD -i eth0 -o ppp0 -j ACCEPT
$IPTABLES -A FORWARD -o eth0 -i ppp0 -j ACCEPT

christoph

Quoted 22 lines · Ruprecht Helms

Hi,

I've the problem that I need some rules for a temporary ppp0 interface.
This interface is only active then the admin has made a dial-up on the server and has activated a ppp-daemon.

In the time the ppp0-Interface is up the connections should be able completely in both directions and through to clients. But this should only alowed for connections via ppp0.

Connections via the normal isdn0 should be protected by the normal firewallroules (iptables).

How have I to configure.

Regards,
Ruprecht

------------------------------------------------------------------------------------------

Ruprecht Helms IT-Service & Softwareentwicklung

Tel./Fax +49[0]7621 16 99 16
Web: htp://www.rheyn.de

Signature · 7 lines
Christoph Georgi
-----------------------------
email.  [email protected]
fon.	+64 (0)9 815 8259

registered linux user #380268
ubuntu 5.04 (ubuntu.com)
#3 lore raw
In reply to Ruprecht Helms

Well if you are using NAT then you can say that ppp+ should be NATed to your extern interface.. should be to complicated? :) pppd brings up a new interface and adds a route to it, so you dont have to worry about this.

Regards,

Edvin Seferovic

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ruprecht Helms
Sent: Donnerstag, 30. Juni 2005 11:24
To: [email protected]
Subject: Configurationrequest for firewall with temporary ppp0-interface

Hi,

I've the problem that I need some rules for a temporary ppp0 interface. This interface is only active then the admin has made a dial-up on the server and has activated a ppp-daemon.

In the time the ppp0-Interface is up the connections should be able completely in both directions and through to clients. But this should only alowed for connections via ppp0.

Connections via the normal isdn0 should be protected by the normal firewallroules (iptables).

How have I to configure.

Regards,
Ruprecht

----------------------------------------------------------------------------
--------------
Ruprecht Helms IT-Service & Softwareentwicklung

Tel./Fax +49[0]7621 16 99 16
Web: htp://www.rheyn.de

#4 lore raw
In reply to Ruprecht Helms
Quoted 5 lines

Hi,

I've the problem that I need some rules for a temporary ppp0 interface. This interface is only active then the admin has made a dial-up on the server and has activated a ppp-daemon.

Maybe it's been said, or not:
You can have iptables rules for devices even if they do not exist or are turned off (`a la "ip link set down")

Jan Engelhardt

Signature · 2 lines
| Gesellschaft fuer Wissenschaftliche Datenverarbeitung Goettingen,
| Am Fassberg, 37077 Goettingen, www.gwdg.de