Enable NATting for internet connection:
ppp0-internet connected port
add on startup or to /etc/init.d/rc.local
sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
Enable Packet accep for incoming requests:
Edit following file and change/uncomment following line to enable packet forwarding for incoming request packets.
/etc/sysctl.conf: net.ipv4.ip_forward = 1
to get control over the packet forwarding, we can forward all NATed packets to a local proxy server
to disable direct packet forwarding, change
/etc/sysctl.conf: net.ipv4.ip_forward = 0
then add an additional route;
i don't know whether the sequence of following will affect, just check you guys ans let me know....
:-)
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
Subscribe to:
Post Comments (Atom)
Beyond Toughness: Why Your Car's Brain Needs AEC-Q100 AND ASIL-B
AEC-Q100 vs. ASIL-B: Quality Meets Safety In the era of autonomous driving and electric vehicles, the electron...
-
This will create a certification file and send to free certification authority " https://certbot.eff.org " sponsored by linux foun...
-
Annual Technical Conference 2006 of IET-YMS Sri Lanka, 16 th October 2010 Department of Electrical and Information Engineering, University ...
-
Installing MPICH2 parallel computing from package manager or Ubuntu software center, will need lot configurations of available real processo...
to get control over the packet forwarding, we can forward all NATed packets to a local proxy server
ReplyDeleteto disable direct packet forwarding, change
/etc/sysctl.conf: net.ipv4.ip_forward = 0
then add an additional route;
i don't know whether the sequence of following will affect, just check you guys ans let me know....
:-)
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE