I want to learn more about network technology. Therefore I want to run a raspberry pi in the DMZ as a web server.
What is working: Appache Server on the pi is working. When I use it in the LAN and allow the Linksys to forward the ports it local 192.168.1.xxx (static IP), I can access it from the outside.
My Problem: I coudn't find the right configuration, when it is pluged on the DMZ port.
Configuration of LRT214: (Got from ISP, working)
Interface 1: WAN1
WAN Connection type: Static IP
WAN IP Adress: 12.34.56.01 (Number here modified for security reason)
Subnet: 255.255.255.240
Default Gateway: 12.34.56.02 (Number here modified for security reason)
DNS 1: 8.8.8.8
DNS 2: 8.8.4.4
Setting I don't understand (on LRT214):
DMZ Private IP Addres: xxx.xxx.xxx.xx
What is meant by this. Is this the IP, which I shall use as static IP in the raspberry?
*Settings where I need help: Raspberry /etc/network/interfaces"
I assume that I have to write here something meaningful in the form of:
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
Anyhow my tries with 192.168.1.xxx and 12.34.56.xx failed.
I'm aware that my next step is set-up the iptables on the raspberry correctly. My plan is to block everything except http: and ssh: here.
iptables -P INPUT ACCEPT # only required, so that I don't lock myself out during SSH session
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -P INPUT DROP # now drop the rest
Thanks for your help on correct setup.
Edit While writting this i am wondering if the raspberry at the DMZ would need a seperate static WAN IP. Other than 12.34.56.01. Because how should the router know which traffic skould be routed to the raspberry and which should be routed to the LAN? Any important setting which i have missed.