View previous topic :: View next topic |
Author |
Message |
shaumux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Sun Apr 12, 2009 1:54 pm Post subject: Gentoo as Router with UPnP[solved] |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
shaumux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Sun Apr 12, 2009 2:42 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Inodoro_Pereyra Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/92378496348d685bd147ab.gif)
Joined: 03 Nov 2006 Posts: 2631 Location: En la otra punta del cable
|
Posted: Sun Apr 12, 2009 5:25 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
shaumux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Sun Apr 12, 2009 6:44 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Inodoro_Pereyra Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/92378496348d685bd147ab.gif)
Joined: 03 Nov 2006 Posts: 2631 Location: En la otra punta del cable
|
Posted: Sun Apr 12, 2009 7:17 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Simba7 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/854676963614a3abd4e1a0.jpg)
Joined: 22 Jan 2007 Posts: 708 Location: Billings, MT, USA
|
Posted: Sun Apr 12, 2009 7:55 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
shaumux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Mon Apr 13, 2009 5:06 pm Post subject: |
|
|
ok the wan device name ppp0.
Can i somehow map it to some kind of virtual eth2 maybe? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54835 Location: 56N 3W
|
Posted: Mon Apr 13, 2009 5:12 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
shaumux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Mon Apr 13, 2009 11:25 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Inodoro_Pereyra Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/92378496348d685bd147ab.gif)
Joined: 03 Nov 2006 Posts: 2631 Location: En la otra punta del cable
|
Posted: Tue Apr 14, 2009 2:08 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
shaumux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Tue Apr 14, 2009 8:28 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Inodoro_Pereyra Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/92378496348d685bd147ab.gif)
Joined: 03 Nov 2006 Posts: 2631 Location: En la otra punta del cable
|
Posted: Tue Apr 14, 2009 5:04 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
shaumux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Tue Apr 14, 2009 5:57 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
shaumux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Wed Apr 15, 2009 5:18 pm Post subject: |
|
|
Ok i got it to work the <int_if> is the internal interface
Thanks for the help. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|