joerg@joerg-ubuntu:~$ telnet 192.168.178.1
Trying 192.168.178.1...
Connected to 192.168.178.1.
Escape character is '^]'.
BusyBox v1.8.2 (2010-07-08 13:23:44 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
ermittle die aktuelle TTY
tty is "/dev/pts/0"
Console Ausgaben auf dieses Terminal umgelenkt
# cd /var/media/ftp/
# ls
FRITZ Videos lost+found
Musik iptables_und_openvpn_FB7390_84_04_91.tar
# tar xvf iptables_und_openvpn_FB7390_84_04_91.tar
iptables
net/
net/netfilter/
net/netfilter/xt_pkttype.ko
net/netfilter/xt_conntrack.ko
net/netfilter/xt_realm.ko
net/netfilter/xt_state.ko
net/netfilter/xt_comment.ko
net/netfilter/xt_quota.ko
net/netfilter/xt_esp.ko
net/netfilter/xt_NOTRACK.ko
net/netfilter/xt_length.ko
net/netfilter/xt_NFQUEUE.ko
net/netfilter/xt_helper.ko
net/netfilter/xt_mark.ko
net/ipv4/
net/ipv4/netfilter/
net/ipv4/netfilter/ipt_TOS.ko
net/ipv4/netfilter/ipt_ttl.ko
net/ipv4/netfilter/ip_nat_irc.ko
net/ipv4/netfilter/ip_nat_ftp.ko
net/ipv4/netfilter/ipt_MASQUERADE.ko
net/ipv4/netfilter/ip_conntrack_tftp.ko
net/ipv4/netfilter/ipt_layer7.ko
net/ipv4/netfilter/ip_conntrack_irc.ko
net/ipv4/netfilter/ip_conntrack_h323.ko
net/ipv4/netfilter/ip_nat_sip.ko
net/ipv4/netfilter/ipt_REDIRECT.ko
net/ipv4/netfilter/iptable_nat.ko
net/ipv4/netfilter/ip_nat_h323.ko
net/ipv4/netfilter/ipt_ah.ko
net/ipv4/netfilter/ip_conntrack.ko
net/ipv4/netfilter/arp_tables.ko
net/ipv4/netfilter/ipt_SAME.ko
net/ipv4/netfilter/ip_nat_pptp.ko
net/ipv4/netfilter/ipt_tos.ko
net/ipv4/netfilter/ip_conntrack_pptp.ko
net/ipv4/netfilter/ip_conntrack_sip.ko
net/ipv4/netfilter/ip_nat_snmp_basic.ko
net/ipv4/netfilter/ip_nat_tftp.ko
net/ipv4/netfilter/ipt_ipp2p.ko
net/ipv4/netfilter/ip_conntrack_ftp.ko
net/ipv4/netfilter/iptable_raw.ko
net/ipv4/netfilter/ip_nat.ko
net/ipv4/netfilter/ipt_NETMAP.ko
loadmodules.sh
openvpn
# ./loadmodules.sh
# lsmod
Module Size Used by Tainted: P
xt_state 1603 0
xt_realm 1286 0
xt_quota 1698 0
xt_pkttype 1481 0
xt_mark 1445 0
xt_length 1515 0
xt_helper 1785 0
xt_esp 1649 0
xt_conntrack 2203 0
xt_comment 1401 0
xt_NOTRACK 1461 0
xt_NFQUEUE 1545 0
iptable_raw 1447 0
iptable_nat 6662 0
ipt_ttl 1519 0
ipt_tos 1231 0
ipt_layer7 12844 0
ipt_ipp2p 9187 0
ipt_ah 1478 0
ipt_TOS 1684 0
ipt_SAME 1883 0
ipt_REDIRECT 1562 0
ipt_NETMAP 1537 0
ipt_MASQUERADE 2579 0
ip_nat_tftp 1532 0
ip_nat_snmp_basic 10464 0
ip_nat_sip 3799 0
ip_nat_pptp 4243 0
ip_nat_irc 2220 0
ip_nat_h323 7066 0
ip_nat_ftp 3094 0
ip_nat 15549 11 iptable_nat,ipt_SAME,ipt_REDIRECT,ipt_NETMAP,ipt_MASQUERADE,ip_nat_tftp,ip_nat_sip,ip_nat_pptp,ip_nat_irc,ip_nat_h323,ip_nat_ftp
ip_conntrack_tftp 3225 1 ip_nat_tftp
ip_conntrack_sip 6520 1 ip_nat_sip
ip_conntrack_pptp 8689 1 ip_nat_pptp
ip_conntrack_irc 5572 1 ip_nat_irc
ip_conntrack_h323 47996 1 ip_nat_h323
ip_conntrack_ftp 6472 1 ip_nat_ftp
ip_conntrack 44164 21 xt_state,xt_helper,xt_conntrack,xt_NOTRACK,iptable_nat,ipt_layer7,ipt_MASQUERADE,ip_nat_tftp,ip_nat_snmp_basic,ip_nat_sip,ip_nat_pptp,ip_nat_irc,ip_nat_h323,ip_nat_ftp,ip_nat,ip_conntrack_tftp,ip_conntrack_sip,ip_conntrack_pptp,ip_conntrack_irc,ip_conntrack_h323,ip_conntrack_ftp
arp_tables 10412 0
userman_mod 42796 2
sch_sfq 5671 4
sch_llq 9170 1
sch_tbf 5716 1
kdsldmod 986168 7 userman_mod
ohci_hcd 20196 0
ehci_hcd 29274 0
usbcore 126854 3 ohci_hcd,ehci_hcd
dect_io 16010 0
avm_dect 231812 1 dect_io
capi_codec 186124 0
isdn_fbox_fon5 766763 5
pcmlink 276062 3 avm_dect,capi_codec,isdn_fbox_fon5
rtc_avm 6557 1 pcmlink
rtc_core 7083 1 rtc_avm
rtc_lib 2712 2 rtc_avm,rtc_core
Piglet_noemif 28817 0
bmedrv 5871 0
opensrc_lkm 2038 1 bmedrv
aclap_driver_lkm 19861 0
periap_driver_lkm 12348 0
sysKCode_lkm 12468 0
ethdriver_lkm 37933 2 aclap_driver_lkm,periap_driver_lkm
timers_lkm 6121 0
bmdriver_lkm 12479 0
ap2ap_lkm 22767 4 kdsldmod,aclap_driver_lkm,ethdriver_lkm,bmdriver_lkm
fusivlib_lkm 46422 8 kdsldmod,bmedrv,aclap_driver_lkm,periap_driver_lkm,sysKCode_lkm,ethdriver_lkm,bmdriver_lkm,ap2ap_lkm
led_modul_Fritz_Box_7390 65357 2
#
# ./iptables -t nat -L -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 1 packets, 54 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1 packets, 54 bytes)
pkts bytes target prot opt in out source destination
#
#
# ./iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
#
# ./iptables -t nat -L -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- any tun0 anywhere anywhere
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
# mknod /var/tmp/tun c 10 200
#
# ./openvpn --genkey --secret my.key
# cat my.key
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
cb7c6a8b96870d336300ef2dc8496e58
03d8f337c3c25092d994fb88ac55a7d7
ca8d971081d96e8eed596993ca34ee77
c37008b83fa331d68ead81331b7cd9e3
02b9854776302da9073f2f0cdb12afa8
0493848f5209fe6f9da388ade924f30d
b2ed59fe868b3a3a639147962f6275e9
203f8e0dad723b631c21835027ea6ead
a1abe77bc88e16cedcf9da7c03096bb2
b533dbd709790f8a0f974c147f1971b6
e1f61d303a21a263821eabdfcd218896
00c920d4bf685b750dbb2a521ab2ed44
8c09177eb7a284e7a4672dafa95ac23a
d05e784c9ca13a5f9805a4ae89fccf04
7df84af5feb793cc933b82bcc5886068
d1816ecb847af65897255eba50729bda
-----END OpenVPN Static key V1-----
#
# ./openvpn --dev tun --ifconfig 10.8.0.1 10.8.0.2 --secret ./my.key --dev-node /var/tmp/tun --daemon
#
# ps | grep openvpn | grep -v grep
1468 root 1376 R ./openvpn --dev tun --ifconfig 10.8.0.1 10.8.0.2 --secret ./my.key --dev-node /var/tmp/tun --daemon
#
# ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP ALLMULTI MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:240 (240.0 B)
#