Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Gen'd by Script
- Contents of the NetWork config file /etc/network/interfaces
- # Local loopback
- auto lo
- iface lo inet loopback
- # Primary internet connection (from Clear Box)
- auto eth2
- iface eth2 inet dhcp
- # Secondary internet connection
- auto wlan0
- iface wlan0 inet dhcp
- wireless-essid abuelitos
- wireless-key abuelitos
- wireless-channel auto
- # wireless-mode managed
- # Secondary network connection (LAN)
- auto eth0
- iface eth0 inet static
- address 192.168.3.2
- netmask 255.255.255.0
- network 192.168.3.0
- broadcast 192.168.3.255
- gateway 192.168.3.1
- # First Virtual Network
- auto eth0:80
- iface eth0:80 inet static
- address 10.10.40.2
- netmask 255.255.255.0
- network 10.10.40.0
- broadcast 10.10.40.255
- gateway 10.10.40.1
- # Connect other NICS
- auto eth1
- iface eth1 inet static
- address 192.168.20.2
- netmask 255.255.255.0
- network 192.168.20.1
- broadcast 192.168.20.255
- gateway 192.168.20.1
- Contents of the DHCP config file /etc/dhcp3/dhcpd.conf
- # Hold old values
- #default-lease-time 600;
- #max-lease-time 7200;
- # Set new lease values
- default-lease-time 1200;
- max-lease-time 12000;
- option subnet-mask 255.255.255.0;
- option broadcast-address 192.168.3.255;
- option routers 192.168.3.2;
- option domain-name-servers 192.168.1.1, 204.232.137.207;
- option domain-name "tc-noc-server";
- log-facility local7;
- subnet 192.168.3.0 netmask 255.255.255.0 { range 192.168.3.10 192.168.3.200;}
- Contents of the sysctl.conf file /etc/sysctls.conf
- #
- # /etc/sysctl.conf - Configuration file for setting system variables
- # See /etc/sysctl.d/ for additional system variables.
- # See sysctl.conf (5) for information.
- #
- #kernel.domainname = example.com
- # Uncomment the following to stop low-level messages on console
- #kernel.printk = 4 4 1 7
- ##############################################################3
- # Functions previously found in netbase
- #
- # Uncomment the next two lines to enable Spoof protection (reverse-path filter)
- # Turn on Source Address Verification in all interfaces to
- # prevent some spoofing attacks
- #net.ipv4.conf.default.rp_filter=1
- #net.ipv4.conf.all.rp_filter=1
- # Uncomment the next line to enable TCP/IP SYN cookies
- #net.ipv4.tcp_syncookies=1
- # Uncomment the next line to enable packet forwarding for IPv4
- #net.ipv4.ip_forward=1
- # Uncomment the next line to enable packet forwarding for IPv6
- #net.ipv6.conf.all.forwarding=1
- ###################################################################
- # Additional settings - these settings can improve the network
- # security of the host and prevent against some network attacks
- # including spoofing attacks and man in the middle attacks through
- # redirection. Some network environments, however, require that these
- # settings are disabled so review and enable them as needed.
- #
- # Ignore ICMP broadcasts
- #net.ipv4.icmp_echo_ignore_broadcasts = 1
- #
- # Ignore bogus ICMP errors
- #net.ipv4.icmp_ignore_bogus_error_responses = 1
- #
- # Do not accept ICMP redirects (prevent MITM attacks)
- #net.ipv4.conf.all.accept_redirects = 0
- #net.ipv6.conf.all.accept_redirects = 0
- # _or_
- # Accept ICMP redirects only for gateways listed in our default
- # gateway list (enabled by default)
- # net.ipv4.conf.all.secure_redirects = 1
- #
- # Do not send ICMP redirects (we are not a router)
- #net.ipv4.conf.all.send_redirects = 0
- #
- # Do not accept IP source route packets (we are not a router)
- #net.ipv4.conf.all.accept_source_route = 0
- #net.ipv6.conf.all.accept_source_route = 0
- #
- # Log Martian Packets
- #net.ipv4.conf.all.log_martians = 1
- #disable ipv6
- net.ipv6.conf.all.disable_ipv6 = 1
- net.ipv6.conf.default.disable_ipv6 = 1
- net.ipv6.conf.lo.disable_ipv6 = 1
- # enable forwarding
- net.ipv4.conf.default.forwarding=1
- net.ipv4.conf.all.forwarding=1
- net.ipv4.ip_forward=1
- Contents of the resolv.conf file /etc/resolv.conf
- nameserver 192.168.15.1
- Contents of the hostname file /etc/hostname
- tc-noc-server
- Contents of the iptables file /etc/iptables
- Snap shot of the network settings from ifconfig
- eth0 Link encap:Ethernet HWaddr 00:0c:f1:ac:5a:7b
- inet addr:192.168.3.2 Bcast:192.168.3.255 Mask:255.255.255.0
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:6407 errors:0 dropped:0 overruns:0 frame:0
- TX packets:6134 errors:0 dropped:0 overruns:0 carrier:0
- collisions:3 txqueuelen:1000
- RX bytes:3485623 (3.4 MB) TX bytes:1452534 (1.4 MB)
- eth0:80 Link encap:Ethernet HWaddr 00:0c:f1:ac:5a:7b
- inet addr:10.10.40.2 Bcast:10.10.40.255 Mask:255.255.255.0
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- eth1 Link encap:Ethernet HWaddr 00:10:5a:12:c0:ff
- inet addr:192.168.20.2 Bcast:192.168.20.255 Mask:255.255.255.0
- UP BROADCAST MULTICAST MTU:1500 Metric:1
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
- Interrupt:17 Base address:0x2800
- eth2 Link encap:Ethernet HWaddr 00:10:5a:82:9a:cd
- inet addr:192.168.15.4 Bcast:192.168.15.255 Mask:255.255.255.0
- UP BROADCAST RUNNING MULTICAST MTU:1400 Metric:1
- RX packets:884 errors:0 dropped:0 overruns:0 frame:0
- TX packets:2781 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:234887 (234.8 KB) TX bytes:289323 (289.3 KB)
- Interrupt:18 Base address:0x4400
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- UP LOOPBACK RUNNING MTU:16436 Metric:1
- RX packets:1389 errors:0 dropped:0 overruns:0 frame:0
- TX packets:1389 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:206557 (206.5 KB) TX bytes:206557 (206.5 KB)
- wlan0 Link encap:Ethernet HWaddr 00:0f:3d:ad:c3:c8
- inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:19831 errors:0 dropped:0 overruns:0 frame:0
- TX packets:21965 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:13554936 (13.5 MB) TX bytes:7317457 (7.3 MB)
- WiFi/Networking Start/Restart Script
- #! /bin/bash
- # Files needed for networking are:
- # /etc/network/interfaces
- # /etc/iptables
- # /etc/resolv.conf
- # /etc/sysctl.conf
- #
- # Find current wlan0 channel with
- # iwlist ath0 channel;
- # Run the commands to start network passthru
- /etc/init.d/dhcp3-server restart;
- /etc/init.d/networking restart;
- # If Network Manager Icon shows on status bar run next line, else comment out
- restart network-manager;
- /etc/init.d/dhcp3-server restart;
- # Additional commands
- sysctl -w net.ipv4.ip_forward=1;
- iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE;
- iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE;
- # Finish
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement