This might sound like a noob question, but here is what I have to configure:
- 1 server with 2 network cards
- 1 network card for internal IP addresses (5 of them)
- 1 network card for external IP addresses (3 of them)
- the server is the DNS server as well as the Proxy Server and Samba server
- one router Netgear SRX5308 (SNMP enabled)
- A GB Cisco switch 48 ports (SNMP enabled)
I want the internal traffic (192.168..) to be routed in one card and the "external" traffic on the other network card.
my rc.conf looks something like this:
defaultrouter="174.###.49" static_routes="office" route_office="-net 192.0.0.0/8 192.168.1.1" ifconfig_em0="inet 192.168.1.9 netmask 255.255.0.0 broadcast 192.168.1.255" ifconfig_em0_alias0="inet 192.168.1.10 netmask 255.255.255.255 broadcast 192.168.1.10" ifconfig_em0_alias1="inet 192.168.1.11 netmask 255.255.255.255 broadcast 192.168.1.11" ifconfig_em0_alias2="inet 192.168.1.12 netmask 255.255.255.255 broadcast 192.168.1.12" ifconfig_em0_alias3="inet 192.168.1.231 netmask 255.255.255.255 broadcast 192.168.1.231" ifconfig_em1="inet 174.###.51 netmask 255.255.255.248 broadcast 174.###.55" ifconfig_em1_alias0="inet 174.###.52 netmask 255.255.255.255 broadcast 174.###.52" ifconfig_em1_alias1="inet 174.###.53 netmask 255.255.255.255 broadcast 174.###.53"
Currently everything works but I have em0 (internal) connected to the switch and em1(external) directly connected with the external line.
What I would like to do is to connect the external line to the same switch or the netgear router so I can monitor the traffic better.
I have tried to configure the router with a DMZ (174.###.51/255.255.255.252) but it didn't work. I have also tried to set the default router to 192.168.1.1 and connect both to the switch. This worked and I was able to connect with the outside world, but the servers were not reachable from outside.
I know some routers have a "reroute" feature for the IP address.. you hit "174.###.##" and you reroute it to 192.168.1.9 ... but I can't find it on this router.
I know I could purchase a small smart switch with SNMP and it would be solved, but I believe that what I want to achieve is already possible with what I have, I just don't know how to configure it right.
keep in mind that I am converting an old network with 3 servers into one server and I cannot drop nor change the IP addresses for now. The server is also a monitor system for other servers as well as a backup and has a small html page that needs to be accessible from everywhere)
What I am trying to achieve is:
ISP -> SERVER &&
INTERNAL -> SWITCH -> SERVER -> ISP
what I want is:
ISP -> ROUTER -> SERVER &&
INTERNAL -> SWITCH -> SERVER
I also would like to keep em0 for only 192 traffic and em1 for only 174 incoming traffic and all the outgoing traffic (this is also a proxy server)
EDIT 2: Let's see if I can explain myself better. Sorry English is not my first language.
- Outgoing traffic:
USER -> SWITCH -> SERVER -> ROUTER -> THE NET -> ROUTER -> SERVER -> SWITCH -> USER
- Incoming traffic:
THE NET -> ROUTER -> SERVER
Currently I have:
USER -> SWITCH -> SERVER -> THE NET -> SERVER -> SWITCH -> USER
THE NET -> SERVER
Incoming is used for backups, some http traffic, various rsync, and push monitoring (something I wrote, monitoring both ways, checking the outside server and waiting from outside server information not at the same time that the "sent" is done)