Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I need to setup a server that servers a NAT server for IPMI network

xxx.xxx.xxx.xxx = external IP(internet IP)
aaa.aaa.aaa.aaa = internal IP A
bbb.bbb.bbb.bbb = internal IP B

User 1 -> xxx.xxx.xxx.xxx:1112 <-> aaa.aaa.aaa.aaa
User 2 -> xxx.xxx.xxx.xxx:1113 <-> bbb.bbb.bbb.bbb

xxx.xxx.xxx.xxx sits on a firewall server with a NIC on both networks to serve as the bridge between the two. Let me know anymore required info I cannot figure out how to do this with iptables.

This is what I have
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -t nat -A PREROUTING -t nat -p tcp -d xxx.xxx.xxx.xxx --dport 1111 -j DNAT --to 10.1.0.8:80

share|improve this question
    
Sorry this is a linux box using iptables. –  Byron Jun 25 '13 at 15:02
    
This is pretty basic, and there are many tutorials which explain this in depth. What have you done so far? –  Michael Hampton Jun 25 '13 at 15:52
    
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE iptables -t nat -A PREROUTING -t nat -p tcp -d (eth0IP) --dport 1111 -j DNAT --to 10.1.0.8:80 –  Byron Jun 25 '13 at 18:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.