Log in

Bekijk de volledige versie : Forward to MAC address



Willie2_z
29-06-2005, 19:37
Hi there.
I would like to know if it is possible to forward a port to a specific mac-address ??
If not, could this maybe be included in the next custom firmware ??

/willie2_z :cool:

barsju
29-06-2005, 19:54
I don't think that is possible directly, but what you should/can do is setup a static ip with that mac, and then forward to that ip. You can do this in the web interface. Ip-config->DHCP server->Manually assigned IP list to registrer mac/ip, and then NAT-Settings->Virtual Server for the port forwarding.

S.

Willie2_z
01-07-2005, 11:36
Well, the thing is: I would like to WOL. Wake my computer from another location. But this can only be done to a specific mac-address. So my problem is: I want to forward this WOL-packet to a specifik mac-address. :confused:

barsju
01-07-2005, 11:53
Simple solution that I use:
Log in to router and use ether_wake. To log in safely from WAN use dropbear ssh.

More tricky solution:
Make a script that calls ether_wake, and make it available from the outside by using a httpd (cgi-script) or as a service with xinetd.

S.

PS: I recomend simple solution!

wtzm
02-07-2005, 10:22
I would like to know if it is possible to forward a port to a specific mac-address ??

Certainly not. Actually the question is wrong by definition - a mac address is a concept that operates roughly on Layer 2 of the OSI model while a (TCP or UDP) port is a Layer 4 concept. For further reference visit http://en.wikipedia.org/wiki/OSI_model (but bear in mind that the OSI model is just a theoretical model).

To keep on topic ( :D ): Use barsju's solution.

Willie2_z
03-07-2005, 12:00
hmm, i don't see ether_wake in my configuration tool, and i know jack about programming scripts for my router.. :(

wtzm
03-07-2005, 19:41
You have to login to your router via ssh / telnet first to use the ether-wake utility.

Willie2_z
04-07-2005, 07:58
well i just use the web-interface ?! can't it be done from there ?
actually i didn't know it was possible to ssh to it. I'm going to try it when I get home

barsju
04-07-2005, 09:56
Well ssh needs to be enabled first. So start by telneting. And make sure you have oleg's custom firmware.

Then read up on this page: http://oleg.wl500g.info

And search the forum.

S.

Willie2_z
04-07-2005, 20:19
oki, i upgraded my firmware. and i did all the things on the site about telnet and ssh, but i still can't ssh to it. :(

barsju
05-07-2005, 16:11
Did you telnet to it and start dropbear? Run "ps" to make sure that dropbear is running..

S.

Willie2_z
05-07-2005, 17:05
hehe
now i can ssh it.
now what ??

barsju
05-07-2005, 17:13
now: ether-wake xx:xx:xx:xx:xx:xx
...
S.

Willie2_z
05-07-2005, 21:24
nice...
looks like it work.
new problem. i can't connect via ssh or telnet from another location, from WAN, only locally. I use putty to ssh, if i try to ssh from WAN it just times out.

Yusaku
06-07-2005, 11:50
You need to change your firewall (iptables) rules

Willie2_z
06-07-2005, 14:17
well, please be more specific what to do ? I know jack about iptables. :(
well, i figured this much: iptables -I INPUT -m tcp -p tcp --dport 22 -j ACCEPT, is this right ??
but where to i have to type it ??

barsju
14-07-2005, 09:28
ok. you got this far. if you type that in your router (while connected with telnet or ssh) it should work. You should try to test it.
Go to ShieldsUP! (https://www.grc.com/x/ne.dll?bh0bkyd2) , and check if port 22 is open.

Now when that is verified, your next problem is that when your router is rebooted your setting will be lost. To solve that you need to put that line in a file called /usr/local/sbin/post-firewall by issuing this command:

echo "iptables -I INPUT -m tcp -p tcp --dport 22 -j ACCEPT" > /usr/local/sbin/post-firewall

Now if your router this file will also dissapear, so you need to save it to non-volatile flash memory:


flashfs save
flashfs commit
flashfs enable


You can find all this info in http://oleg.wl500g.info/, which i suggest you read up on (again.. :))

B.

PS: Whats his face, mc..something has some very nice tutorials you should try to find. Search forum for tutorials.

Willie2_z
14-07-2005, 19:26
I did as you typed, but it still just times out when i try to ssh to the router from WAN ?!?? :confused:

rdude
17-07-2005, 23:59
well i just use the web-interface ?! can't it be done from there ?
actually i didn't know it was possible to ssh to it. I'm going to try it when I get home

Yes, it can, in Oleg's FW: System setup/System command - you put here: ether-wake xx:xx:xx:xx:xx:xx then press refresh and done.

Willie2_z
18-07-2005, 16:31
Well, now I have the ssh service running, so it could be cool to actually ssh to my router from WAN !?
why isn't this possible, what am i doing wrong ?!

rdude
18-07-2005, 18:03
This line in post-firewall did the trick for me:

iptables -I INPUT 2 -p tcp --syn --dport 22 -j ACCEPT

Willie2_z
19-07-2005, 14:23
it still just times out ??
fucking weird !

Antiloop
19-07-2005, 15:22
it still just times out ??
fucking weird !
try adding
#!/bin/sh to the top of the post file

don't know for sure if it is needed I suppose it is

Willie2_z
19-07-2005, 20:29
still doesn't work.
it's all fucked !