TheRudy
16th September 2006, 01:00
Hey
I have a new server with some stupid control panel which requires to use public IP on the machine itself. All config files (apache,...) are using this public IP. Now the problem is that i'm not going to put this server directly to the internet line since i have sonicwall firewall. I want it behind it and since i can't use local IP's on that server i've got a problem.
So far what i did to even install it, i set another IP to the NIC so now i have two IP's on 1 NIC. Public IP which is my real public IP (eth0:0) and is used in all config files and local IP (eth0) for LAN (sonicwall).
What i want to do is this: If sonicwall sends data to server over local IP (LAN) i want it to route that traffic to public IP on the server (all the same server!!). If server sends some data from public IP (all config files are using Public ip), i want it to route it to local IP which then sends data to sonicwall over LAN.
Basically i need to trick all the programs (www, email, ftp,...) to think that they are using my public IP while in fact all the traffic is done over LAN ip.
Anyone can direct me into what i need to check out to do this? IP routing?
Edit: Right, IP alias is what i currently have set now :D
Still now sure if this is enough is for example i try to access email the traffic goes like this:
internet -> sonicwall with public IP -> over LAN to server -> from lan IP on the server -> public IP (eth0:0 alias) on the server. And vice versa when server sends data back..
edit2: hmm, yes, let me post the current setup in interfaces file:
auto eth0
iface eth0 inet static
address 192.168.2.100
netmask 255.255.255.0
gateway 192.168.2.1
auto eth0:0
iface eth0:0 inet static
address PUBLIC IP
netmask 255.255.255.0
gateway 192.168.2.1
I have a new server with some stupid control panel which requires to use public IP on the machine itself. All config files (apache,...) are using this public IP. Now the problem is that i'm not going to put this server directly to the internet line since i have sonicwall firewall. I want it behind it and since i can't use local IP's on that server i've got a problem.
So far what i did to even install it, i set another IP to the NIC so now i have two IP's on 1 NIC. Public IP which is my real public IP (eth0:0) and is used in all config files and local IP (eth0) for LAN (sonicwall).
What i want to do is this: If sonicwall sends data to server over local IP (LAN) i want it to route that traffic to public IP on the server (all the same server!!). If server sends some data from public IP (all config files are using Public ip), i want it to route it to local IP which then sends data to sonicwall over LAN.
Basically i need to trick all the programs (www, email, ftp,...) to think that they are using my public IP while in fact all the traffic is done over LAN ip.
Anyone can direct me into what i need to check out to do this? IP routing?
Edit: Right, IP alias is what i currently have set now :D
Still now sure if this is enough is for example i try to access email the traffic goes like this:
internet -> sonicwall with public IP -> over LAN to server -> from lan IP on the server -> public IP (eth0:0 alias) on the server. And vice versa when server sends data back..
edit2: hmm, yes, let me post the current setup in interfaces file:
auto eth0
iface eth0 inet static
address 192.168.2.100
netmask 255.255.255.0
gateway 192.168.2.1
auto eth0:0
iface eth0:0 inet static
address PUBLIC IP
netmask 255.255.255.0
gateway 192.168.2.1