IP forwarding
Hello, all
I would like to forward one IP to another IP.
for example, eth0 IP is 211.1.1.1 and eth0:1 is 211.1.1.2 and I would like to forward all request to 211.1.1.2 toward 61.1.2.3 which is another network or not. Is it possible?
I did like this to do, but it is not work.
# ifconfig eth0:1 211.1.1.2 # iptables -t nat -A PREROUTING -d 211.1.1.2 -i eth0 j DNAT --to 61.1.2.3
Any idea?
Thanks in advance.
_________________________________________________________________
보다 빠르고 보기 편한 뉴스. 오늘의 화제는 MSN 뉴스에서 확인하세요. http://www.msn.co.kr/news/
Quoted 10 lines · SB CH
Hello, all
I would like to forward one IP to another IP.
for example,
eth0 IP is 211.1.1.1 and eth0:1 is 211.1.1.2 and I would like to forward all request to 211.1.1.2 toward 61.1.2.3 which is another network or not. Is it possible?
Quoted 4 lines
I did like this to do, but it is not work.
# ifconfig eth0:1 211.1.1.2 # iptables -t nat -A PREROUTING -d 211.1.1.2 -i eth0 j DNAT --to 61.1.2.3
I assume it was just a typo in your email, but that "j" should be "-j".
Did you also add a FORWARDing rule to allow the packets through ?
iptables -A FORWARD -d 61.1.2.3 -j ACCEPT
If that doesn't sort it out,please provide further information about the problem:
1. Can your firewall successfully connect to machine 61.1.2.3 ?
2. Are the source and destination machines on opposite sides of your firewall, so that both initial packets and replies get routed through the firewall ?
3. Add a LOG rule or use a packet sniffer to find out what is arriving at your firewall and tell you what you see and what is missing.
4. What protocol are you trying to use to connect to 61.1.2.3 ?
Antony.
Signature · 2 lines
The first ninety percent of an engineering project takes ninety percent of the time, and the last ten percent takes the remaining ninety percent.