UnGod
01-03-2004, 08:58 PM
Ok, This will be a bit long, so be forewarned, this also isn't for the faint of heart. I can only point you in the right direction, from there on your on your own.
I recently purchased a Wireless switch+router (all in one), and decided to finally put all my machines behind it. I have 2 switches (the router included) and a true hub (this plays NO part).
I was trying to think of a way to fit the hub in there without sacrificing too much performance from the switches and just fiddling of course, when it came to me how to get past this issue.
It's quite simple actually concept wise. My EQ Machine uses the linux machine as it's default gateway (though the linux machine does NO NAT)
First step was getting the tools, and kernel setup correctly. You need to do a bit of advanced routing with the linux machine, so you must have iproute2 installed (many distros come with this pre installed, or available as an RPM/package/etc), alternativly you can find the source at: ftp://ftp.sunet.se/pub/Linux/ip-routing/ (the file you want is "iproute2-2.4.7-now-ss020116-try.tar.gz") (or just click HERE (ftp://ftp.sunet.se/pub/Linux/ip-routing/iproute2-2.4.7-now-ss020116-try.tar.gz))
Next, you must have the two options: "IP: advanced router" and "IP: policy routing" enabled in your kernel compile (some if not all distributions will require a recompile of the kernel for this one, slackware does not have it enabled per default)
I do not have the time to write up a kernel compile FAQ for this, see http://www.linux.org for some howto's or so.
Thats the hard parts!
This was done with a Linksys Wireless Router, so the procedure is for that, it WILL vary per router manufacturer or perhaps even models.
Lets assume your router is 192.168.0.1, your linux machine is 192.168.0.2 and your windows (eq) machine is 192.168.0.3.
Both the linux and windows machines must be assigned static ip addresses (which address is irrelivant, but it must be static)
Execute the following command on your linux machine:
echo 200 EQ >> /etc/iproute2/rt_tables
You also need to have the following in a boot script somewhere (after net is initialized) (or type in manually for now):
ip rule add from 192.168.0.3 table EQ
ip route add default via 192.168.0.1 dev eth0 table EQ
ip route flush cache
Thats it for the linux machine configuration! (yay)
Now on to the router.
On my linksys router, it's under "Setup"->"Advanced Routing"
You can enter static routes, what you need to do, is setup a route for any traffic to 192.168.0.3, to be forwarded through 192.168.0.2
So for route name, enter whatever you want. Destination LAN IP should be 192.168.0.3. Subnet Mask should be 255.255.255.0. Default Gateway should be 192.168.0.2. And interface should be LAN & Wireless (or whathave you).
Click Save Settings and your done with the router config.
Now to the windows machine.
Open up the properties for your internet connection, and select the properties of: Internet Protocol (TCP/IP)
Select "Use the following IP Address:"
And enter in: 192.168.0.3 for the ip, 255.255.255.0 for the netmask, and 192.168.0.2 for the default gateway
Enter in DNS servers to your liking (may wish to cat /etc/resolve.conf on the linux machine to see which ones it uses)
Click ok, save yadda yadda.
You may or may not have to reboot the windows machine after this.
And your good to go!
All traffic will now be routed through 192.168.0.2 (linux machine) which leaves it well able to be viewed via tcpdump/seq
You could go a bit further into this as well if you wanted.
You could narrow down the routes, so all normal traffic is routed through 192.168.0.1 (the router), and only EQ traffic is actually routed through the linux machine. Though as I am unsure of all the IPs of the EQ servers, I don't want to put up a list of them :P
But it's pretty trivial, and if you can follow this to this point, getting it to be EQ specific should be trivial for you as well ;)
UnGod/Belith (happily fiddling with his new Linksys router)
I recently purchased a Wireless switch+router (all in one), and decided to finally put all my machines behind it. I have 2 switches (the router included) and a true hub (this plays NO part).
I was trying to think of a way to fit the hub in there without sacrificing too much performance from the switches and just fiddling of course, when it came to me how to get past this issue.
It's quite simple actually concept wise. My EQ Machine uses the linux machine as it's default gateway (though the linux machine does NO NAT)
First step was getting the tools, and kernel setup correctly. You need to do a bit of advanced routing with the linux machine, so you must have iproute2 installed (many distros come with this pre installed, or available as an RPM/package/etc), alternativly you can find the source at: ftp://ftp.sunet.se/pub/Linux/ip-routing/ (the file you want is "iproute2-2.4.7-now-ss020116-try.tar.gz") (or just click HERE (ftp://ftp.sunet.se/pub/Linux/ip-routing/iproute2-2.4.7-now-ss020116-try.tar.gz))
Next, you must have the two options: "IP: advanced router" and "IP: policy routing" enabled in your kernel compile (some if not all distributions will require a recompile of the kernel for this one, slackware does not have it enabled per default)
I do not have the time to write up a kernel compile FAQ for this, see http://www.linux.org for some howto's or so.
Thats the hard parts!
This was done with a Linksys Wireless Router, so the procedure is for that, it WILL vary per router manufacturer or perhaps even models.
Lets assume your router is 192.168.0.1, your linux machine is 192.168.0.2 and your windows (eq) machine is 192.168.0.3.
Both the linux and windows machines must be assigned static ip addresses (which address is irrelivant, but it must be static)
Execute the following command on your linux machine:
echo 200 EQ >> /etc/iproute2/rt_tables
You also need to have the following in a boot script somewhere (after net is initialized) (or type in manually for now):
ip rule add from 192.168.0.3 table EQ
ip route add default via 192.168.0.1 dev eth0 table EQ
ip route flush cache
Thats it for the linux machine configuration! (yay)
Now on to the router.
On my linksys router, it's under "Setup"->"Advanced Routing"
You can enter static routes, what you need to do, is setup a route for any traffic to 192.168.0.3, to be forwarded through 192.168.0.2
So for route name, enter whatever you want. Destination LAN IP should be 192.168.0.3. Subnet Mask should be 255.255.255.0. Default Gateway should be 192.168.0.2. And interface should be LAN & Wireless (or whathave you).
Click Save Settings and your done with the router config.
Now to the windows machine.
Open up the properties for your internet connection, and select the properties of: Internet Protocol (TCP/IP)
Select "Use the following IP Address:"
And enter in: 192.168.0.3 for the ip, 255.255.255.0 for the netmask, and 192.168.0.2 for the default gateway
Enter in DNS servers to your liking (may wish to cat /etc/resolve.conf on the linux machine to see which ones it uses)
Click ok, save yadda yadda.
You may or may not have to reboot the windows machine after this.
And your good to go!
All traffic will now be routed through 192.168.0.2 (linux machine) which leaves it well able to be viewed via tcpdump/seq
You could go a bit further into this as well if you wanted.
You could narrow down the routes, so all normal traffic is routed through 192.168.0.1 (the router), and only EQ traffic is actually routed through the linux machine. Though as I am unsure of all the IPs of the EQ servers, I don't want to put up a list of them :P
But it's pretty trivial, and if you can follow this to this point, getting it to be EQ specific should be trivial for you as well ;)
UnGod/Belith (happily fiddling with his new Linksys router)