Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My OS is fedora3. I use the OS to be a NAT Server. I find the NAT type is symmetric cone. How to modify its NAT type. I want a full cone. Thanks for any idea.
what do you need exactly? If you want that every single host on your LAN has its own public IP, then stop using masquerading and use the following command instead:
iptables -t nat -A POSTROUTING -s $PRIVATE_IP_HOST1 -o ppp0 -j SNAT --to-source $PUBLIC_IP_HOST1
if you want to give access to your internal machines from outside your network, use this:
iptables -t nat -A PREROUTING -d $PUBLIC_IP -i ppp0 -j DNAT --to-dest $PRIVATE_IP
in both the command lines you can add -p tcp/udp options and --dport/sport so as to limit the way the translation is applied (that's policy nat)
you can also use the --to-dest $IP:$PORT so as to do some port redirection.
netfilter does symmetric NAT. Nothing else. If you want full cone your only option if you want to keep using iptables is to manually set up a translation table with all your internal and external ip addresses.
Thanks for the replies. I use some P2P communication softs in the LAN. So symmetric nat does not suit my application. Besides setting up a translation table, can I make a real Full cone or Partial/Restricted Cone instead of symmetric cone? thanks for any idea.
Please send me the SYMMETRIC NAT configuration using netfilter
Quote:
Originally Posted by demian
netfilter does symmetric NAT. Nothing else. If you want full cone your only option if you want to keep using iptables is to manually set up a translation table with all your internal and external ip addresses.
Please send me the SYMMETRIC NAT configuration using netfilter
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.