LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can my Slack server also be a router? (https://www.linuxquestions.org/questions/slackware-14/can-my-slack-server-also-be-a-router-656721/)

linuxhippy 07-18-2008 04:36 PM

Can my Slack server also be a router?
 
I am still using Slack 12 on my server and just changed from Verizon DSL to Cavalier DSL. The modem that was sent to me only has a USB output or a single regular ethernet jack. I have 2 computers on my home network since the router that I've been using from Verizon can have 5 computers on it and I have 2 computers on the net....however only one (my Slack 12 server) is on the net 24/7. So, is there a way to get Slackware to also act as a router or is there some way to get this done in the hardware area?

Reading past threads, it looks like IP Forwarding will do this. Cavalier sold me DHCP and that's probably what I have. I have iptables enabled as a firewall....what rule(s) should I use to ensure a secure connection?

vehn 07-18-2008 04:49 PM

see slackbook (on dvd).

I have wireless net and use:
iptables -P INPUT DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -i ath0 -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

linuxhippy 07-18-2008 04:52 PM

I would think that I need to install a 2nd ethernet card into my Slack box for it to be a router...is that correct?

Chuck56 07-18-2008 05:07 PM

Quote:

Originally Posted by linuxhippy (Post 3219319)
I would think that I need to install a 2nd ethernet card into my Slack box for it to be a router...is that correct?

Nope but you're logic is on the right path. You can support multiple IP addresses/subnets with the same physical NIC. One IP for the external interface and another for the internal interface. A separate physical NIC would help if you expect high traffic volumes.

onebuck 07-18-2008 09:44 PM

Hi,

Switches are cheap. 3com, netgear, linksys and Icom to name a few. That doesn't include the el cheapo China switches.


All times are GMT -5. The time now is 10:22 AM.