Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo as Router with UPnP[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
shaumux
Veteran
Veteran


Joined: 13 May 2005
Posts: 1013
Location: Hamburg

PostPosted: Sun Apr 12, 2009 1:54 pm    Post subject: Gentoo as Router with UPnP[solved] Reply with quote

I am making my gentoo PC as a router.
I was reading the official guide.
The wan connection is a usb modem connecting through ppp.
How do i fit it in the guide?


Last edited by shaumux on Wed Apr 15, 2009 5:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Apr 12, 2009 2:27 pm    Post subject: Reply with quote

http://www.gentoo.org/doc/en/home-router-howto.xml#doc_chap3

Your's is ADSL.
Back to top
View user's profile Send private message
shaumux
Veteran
Veteran


Joined: 13 May 2005
Posts: 1013
Location: Hamburg

PostPosted: Sun Apr 12, 2009 2:42 pm    Post subject: Reply with quote

No its not adsl its a 3G wireless evdo modem something like a cellphone modem.
I have to issue several init commands before connecting.
I normally use kppp or wvdial to connect
Back to top
View user's profile Send private message
Inodoro_Pereyra
Advocate
Advocate


Joined: 03 Nov 2006
Posts: 2631
Location: En la otra punta del cable

PostPosted: Sun Apr 12, 2009 5:25 pm    Post subject: Reply with quote

If you skip the bluetooth part, This guide may help.

Cheers!
_________________
Mi Blog.

Si no fuera por C, estaríamos escribiendo programas en BASI, PASAL y OBOL.
Back to top
View user's profile Send private message
shaumux
Veteran
Veteran


Joined: 13 May 2005
Posts: 1013
Location: Hamburg

PostPosted: Sun Apr 12, 2009 6:44 pm    Post subject: Reply with quote

Inodoro_Pereyra wrote:
If you skip the bluetooth part, This guide may help.

Cheers!
The tutorial talks about setting up the internet connection using the modem.
I have already done that.
I want to route the connection to other pcs and i can't understand how to fit this type of connection in the wan part of the official tutorial.
It talks about using eth1 as the adsl port but mine is a usb modem dialled using kppp or wvdial.
Back to top
View user's profile Send private message
Inodoro_Pereyra
Advocate
Advocate


Joined: 03 Nov 2006
Posts: 2631
Location: En la otra punta del cable

PostPosted: Sun Apr 12, 2009 7:17 pm    Post subject: Reply with quote

Well, is exactly the same, just replace any occurrence of eth1 by your WAN device name.

You can get the device name by simply running ifconfig.

As said in the official guide:
Quote:
Copy and paste these examples ...
# export LAN=eth0
# export WAN=#here goes the device name, ppp0 or whatever


Cheers!
_________________
Mi Blog.

Si no fuera por C, estaríamos escribiendo programas en BASI, PASAL y OBOL.
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 708
Location: Billings, MT, USA

PostPosted: Sun Apr 12, 2009 7:55 pm    Post subject: Reply with quote

Darn.. I did this with FreeBSD awhile ago on a 56k Dialup connection.. Ahh.. FreeBSD 3.4..

I'll have to do some digging..
Back to top
View user's profile Send private message
shaumux
Veteran
Veteran


Joined: 13 May 2005
Posts: 1013
Location: Hamburg

PostPosted: Mon Apr 13, 2009 5:06 pm    Post subject: Reply with quote

ok the wan device name ppp0.
Can i somehow map it to some kind of virtual eth2 maybe?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54835
Location: 56N 3W

PostPosted: Mon Apr 13, 2009 5:12 pm    Post subject: Reply with quote

shaumux,

Use the name ppp0 where the guide says to use eth0 or eth1 ... whichever interface is connected to the internet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
shaumux
Veteran
Veteran


Joined: 13 May 2005
Posts: 1013
Location: Hamburg

PostPosted: Mon Apr 13, 2009 11:25 pm    Post subject: Reply with quote

Thanks for the help.
The router setup is working as i want it to.

Now is there some way to implement upnp for dynamic port forwarding but only for a specific system?
Also can i use nat based on mac address and not on ip address as i want to give net access to specific system.
Back to top
View user's profile Send private message
Inodoro_Pereyra
Advocate
Advocate


Joined: 03 Nov 2006
Posts: 2631
Location: En la otra punta del cable

PostPosted: Tue Apr 14, 2009 2:08 am    Post subject: Reply with quote

You can filter any kind of traffic by mac address issuing for example:
Code:
iptables -A INPUT -m mac --mac-source 00:11:22:33:44:55 -j DROP


Im interested in upnp automagically port forwarding too. Let's see if someone else can give us a clue.

Cheers!
_________________
Mi Blog.

Si no fuera por C, estaríamos escribiendo programas en BASI, PASAL y OBOL.
Back to top
View user's profile Send private message
shaumux
Veteran
Veteran


Joined: 13 May 2005
Posts: 1013
Location: Hamburg

PostPosted: Tue Apr 14, 2009 8:28 am    Post subject: Reply with quote

Inodoro_Pereyra wrote:
You can filter any kind of traffic by mac address issuing for example:
Code:
iptables -A INPUT -m mac --mac-source 00:11:22:33:44:55 -j DROP


Im interested in upnp automagically port forwarding too. Let's see if someone else can give us a clue.

Cheers!
can i do?
Code:
iptables -A INPUT -m mac --mac-source 00:11:22:33:44:55 -j ACCEPT

Will it override the ip based rules?
Back to top
View user's profile Send private message
Inodoro_Pereyra
Advocate
Advocate


Joined: 03 Nov 2006
Posts: 2631
Location: En la otra punta del cable

PostPosted: Tue Apr 14, 2009 5:04 pm    Post subject: Reply with quote

Hi againg, iptables list of directives is parsed sequentially, so any rule ending with -j ACCEPT will override any denying rule parsed after that one. No matter if is mac based or ip based.

Cheers!
_________________
Mi Blog.

Si no fuera por C, estaríamos escribiendo programas en BASI, PASAL y OBOL.
Back to top
View user's profile Send private message
shaumux
Veteran
Veteran


Joined: 13 May 2005
Posts: 1013
Location: Hamburg

PostPosted: Tue Apr 14, 2009 5:57 pm    Post subject: Reply with quote

I found this tutorial for upnp implementation on linux
http://www.gentoo-wiki.info/HOWTO_Setup_UPnP_with_IPTables

From this tutorial i don't understand whats
route add -net 239.0.0.0 netmask 255.0.0.0 <int_if>
and why 239.0.0.0?
what is <int_if>
Back to top
View user's profile Send private message
shaumux
Veteran
Veteran


Joined: 13 May 2005
Posts: 1013
Location: Hamburg

PostPosted: Wed Apr 15, 2009 5:18 pm    Post subject: Reply with quote

Ok i got it to work the <int_if> is the internal interface
Thanks for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum