Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
58
rated 0 times [  58] [ 0]  / answers: 1 / hits: 201386  / 2 Years ago, wed, april 13, 2022, 7:24:30

In iptables many times I see the target MASQUERADE. What is that? I searched and found lots of things. But I need someone to explain to me what MASQUERADE is in an easy to understand way?



An example (taken from this answer) is:




sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


More From » networking

 Answers
4

It is an algorithm dependant on the iptables implementation that allows one to route traffic without disrupting the original traffic.



I use the masquerade algorithm when I want to create a virtual wifi adapter and share my wifi.



Im NOT talking about sharing Ethernet connection through your wifi, Im talking about sharing the wifi connection through your wifi via masquerading it to a virtual adapter. This in effect lets you share your wifi connection through wifi.



.



.



Read this and scroll down to MASQUERADE: http://billauer.co.il/ipmasq-html.html



Read this for more in depth: http://oreilly.com/openbook/linag2/book/ch11.html





All those questions about "Connectify for linux" can be solved by implementing the MASQUERADE algo.





For a direct example visit this page: http://pritambaral.com/2012/05/connectify-for-linux-wireless-hotspot/



I HAVE NOT READ THE LAST LINK!!!! But the following is an accurate excerpt/example.



sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -A FORWARD -i wlan0 -j ACCEPT
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


I really dislike how search engines make the algorithm out to be some evil type of hack.. I use it merely so share my internet with my android phones.



FINAL EDIT: this link is the bestest http://gsp.com/cgi-bin/man.cgi?section=3&topic=libalias


[#25197] Friday, April 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nalystcul

Total Points: 390
Total Questions: 106
Total Answers: 115

Location: Tokelau
Member since Sun, May 7, 2023
1 Year ago
nalystcul questions
Sun, May 1, 22, 17:05, 2 Years ago
Mon, Sep 6, 21, 08:12, 3 Years ago
Fri, Mar 18, 22, 20:06, 2 Years ago
;