Use
to see the rules which are you looking for.Code:#iptables -L -n -t nat
What is behind "Virtual Server" found under "NAT settings" in the web-interface? I'm asking about what is Linux doing to setup a virtual server. The source of the question is that when setting a virtual server on port 21-21 there is no iptables rule on the NAT chain as I expected so I guess there must be something else behind this service.
Use
to see the rules which are you looking for.Code:#iptables -L -n -t nat
It is under chain VSERVER in the NAT table.
Code:iptables -t nat -L VSERVER -n -v
Last edited by Tamadite; 23-12-2009 at 15:43.
Isn't it port forwarding with a rule in the input chain?
wengi
Übersicht aller HowTos --- HowTo Overview (mostly german)
WL-HDD mit diesem Setup. --- WL-HDD with this setup.
Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)
Nope!
Code:Chain VSERVER target prot opt source destination DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:21 to:ASUS.IP:21
INPUT chain on the filter table is only meant for the WAN IP incomming traffic destinated to the router itself, e.g router's internal ftp server, router's internal web server, etc.
In this case, since I want to redirect the WAN traffic on port 21 (FTP) to a LAN host the filter table is not target.
In the PREROUTING chain on the NAT table there is a rule for directing to the VSERVER chain all traffic destinated to the WAN_IP.
Last edited by Tamadite; 25-12-2009 at 12:52. Reason: Clarifications