Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know this is not the first topic on the internet about NAT and port forwarding, and I did really googled for it. Did everything according to the manuals, but still failed.

So, my task is to create a router (based on Ubuntu Linux) and make NAT. I can say, that I've accomplished that + I have dhcp + dns servers working ok. But.. One of my PC's under NAT is running windows XP, and I want to be able to rdp it over internet. But I do fail. I'll show my config files for interfaces, NAT and IPtables forwarding rules, plz say what' wrong here:

nat.sh: http://pastie.org/2392650

pf.sh: (for forwarding): http://pastie.org/2392651

UPD:

All worked out by adding:

iptables -t nat -I POSTROUTING -o eth0 -p tcp -d 192.168.1.10 -j SNAT --to-source 192.168.0.1

share|improve this question
/etc/network/interfaces: pastie.org/2392630 – Ugnichenko Dmitriy Aug 18 '11 at 18:34
iptables -L -nv output: pastie.org/2392655 – Ugnichenko Dmitriy Aug 18 '11 at 18:35
fc.sh (resets all rules before configuring): pastie.org/2392645 – Ugnichenko Dmitriy Aug 18 '11 at 18:35

migrated from stackoverflow.com Aug 18 '11 at 22:27

closed as too localized by Jorge Castro, Rinzwind, Stefano Palazzo Aug 19 '11 at 10:58

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.