You are not logged in.

#1 2013-09-25 03:46:42

linuxsir
Member
Registered: 2013-09-25
Posts: 9

[SOLVED] how to use diffrent iptables rules for different ppp account?

x86 plantform run arch linux system , have two network interface etn1 eth0 .eth1 connect to internet. eth0 connect to other terminals through switch. want use different iptables rules for different pppoe account .also want to know how to forbidden more than one terminals established pppoe link use same account at the same time .

Last edited by linuxsir (2013-09-26 06:48:01)

Offline

#2 2013-09-25 04:35:33

Pse
Member
Registered: 2008-03-15
Posts: 415

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

What are you using to manage your connections? netctl, NetworkManager, your own scripts? If you are using NetworkManager, firewalld allows you to pick different settings per connection.

Offline

#3 2013-09-25 05:12:59

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

What are you using PPPoE for? You've only described 2 ethernet interfaces.

Offline

#4 2013-09-26 01:07:04

linuxsir
Member
Registered: 2013-09-25
Posts: 9

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

(What are you using PPPoE for? You've only described 2 ethernet interfaces.)

appreciate for your answer ,i use my own scripts to manage the network, and like i said eth0 connect to other computers (windows pc) through switching hub, eth1 connect to internet. other computers need to established pppoe link to arch linux host so they can visit internet . need a way to use different firewall rules for different pppoe account

Offline

#5 2013-09-26 01:22:23

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

You establish PPPoE sessions over the local network to the Arch machine? Which then routes the traffic?

You should be able to use -i pppX in your iptables rules to match based on which PPP interface a given packet is coming in.

Offline

#6 2013-09-26 02:20:47

linuxsir
Member
Registered: 2013-09-25
Posts: 9

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

(You establish PPPoE sessions over the local network to the Arch machine? Which then routes the traffic?)
first question ,yes that is exactly what i am done. second question i also have a small  scripts on windows pc to solve routes traffic problem
route -p delete 0.0.0.0
route -p add 192.168.9.0 mask 255.255.255.0 192.168.9.1
route -p add 0.0.0.0 mask 0.0.0.0 192.168.22.0
but after a while i found scripts is not necessary because windows always attempt to use PPPoE sessions as default internet connection local connection is also ok
and use  -i pppX in my iptables rules dose not  solve my problem , because same account start PPPoE session could be marked as ppp0 or ppp1. it is hard to identified which account start session.

Offline

#7 2013-09-26 03:00:14

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

Assign a static IP Address to each client in your PPP config then filter based on that address?

Offline

#8 2013-09-26 03:35:53

linuxsir
Member
Registered: 2013-09-25
Posts: 9

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

actually that is the first idea came to me. i visit rp-pppoe official web page,seeking a way to assign a static IP address to each client in  PPP config .but their document is totally useless ,then i try google but found nothing . i guess rp-pppoe software does not support that , did you know any other  software could build a pppoe server support that features

Offline

#9 2013-09-26 06:28:57

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

AFAIK, the last column in the client config file (with the password; I forget the exact name but it's in /etc/ppp/) is usually a * but you can put an IP Address there instead.

Offline

#10 2013-09-26 06:46:29

linuxsir
Member
Registered: 2013-09-25
Posts: 9

Re: [SOLVED] how to use diffrent iptables rules for different ppp account?

thank you very much .the  client config file is /etc/ppp/chap-secrets. well haha

Offline

Board footer

Powered by FluxBB