Hello,
I have a pretty useless satellite link at home (far from any civilization), so I wanted to set up caching in order to speed things up.
I have one router under which I have two separate networks - employee [bridge br0] and student [bridge br1].
I would like traffic on both bridges to be filtered by transparent proxy I have running outside in the Internet.
I don't know iptables very well.
i have this iptables and working.
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 0:20 -j REDIRECT --to-port 8080 #bypass SSH
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 23:442 -j REDIRECT --to-port 8080 #bypass SSL
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 444:2082 -j REDIRECT --to-port 8080 #Cpanel SSL
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 2084:2086 -j RE
Possible Duplicate:
iptables: forward port 80 to port 8080
I'd like to forward port 80 to 8080.
So I tried to edit /etc/syscongfig/iptables:
-A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
But got:
# service iptables restart
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK
I'd like to allow mail through iptables and DROP policy but this script doesn't work what it is wrong here:
## FLUSH de reglas
iptables -F
iptables -X
iptables -Z
iptables -t nat -F
## policy
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
# localhost
iptables -A INPUT -i lo -j ACCEPT
# Allow my ip
iptables -A INPUT -s MY_IP -j ACCEPT
# 80 port
iptables -A I
I'm trying to open up port 8080 on my CentOS 5, Apache 2.2.3 server. When I go to ip:8080/mydirectory - it times out.
I have an existing iptables setup that does port forwarding. In this port forwarding scenario there are some instances where I do not want it to port forward. So, for instance I have this defined:
iptables -A PREROUTING -t nat -i eth0 '!' -s 10.200.0.0/16 -p tcp --dport 80 -j DNAT --to 10.200.30.11
This will prevent 10.200/16 from accessing this rule.
How do I use iptables to reject all traffic to localhost port 80 but allow the one that comes from local machine?
Here is my current solution that doesn't seems to block the traffic. the ip, the the ip of the local machine.
i am trying to learn NAT ing with iptables but i ran into some confusions.
i am having two virtual machines with ips 18.43 lets say B and 18.42 C running webservers on port 80.
i need to NAT every traffic coming on B:80 to C:80 (Do not want to use any other techinique other than NAT)
rule on B with ip-forward on and Default Policy of every chain is to ACCEPT
iptables -t nat -A PREROUTING -p tcp